Skip to content

Instantly share code, notes, and snippets.

@markasoftware
Last active July 19, 2025 10:03
Show Gist options
  • Save markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 to your computer and use it in GitHub Desktop.
Save markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 to your computer and use it in GitHub Desktop.
OpenProject Enterprise mode for free
############ If you are using DOCKER all-in-one image, create Dockerfile like: ################
############ FROM openproject/openproject:16 ################
############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################
############ If you are runing a manual installation: ################
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ If using some other set up (eg docker-compose), read the comments on ################
############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################
# OpenProject is an open source project management software.
# Copyright (C) the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
#
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
# Copyright (C) 2006-2013 Jean-Philippe Lang
# Copyright (C) 2010-2013 the ChiliProject Team
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# See COPYRIGHT and LICENSE files for more details.
#++
class EnterpriseToken < ApplicationRecord
class << self
def current
self.new
end
def allows_to?(feature)
true
end
def active?
true
end
def hide_banners?
true
end
def show_banners?
false
end
def banner_type_for(feature:)
nil
end
end
def token_object
Class.new do
def has_feature?(feature)
true
end
def will_expire?
false
end
def mail
"[email protected]"
end
def subscriber
"markasoftware-free-enterprise-mode"
end
def company
"markasoftware"
end
def domain
"markasoftware.com"
end
def issued_at
Time.zone.today - 1
end
def starts_at
Time.zone.today - 1
end
def expires_at
Time.zone.today + 1
end
def reprieve_days
nil
end
def reprieve_days_left
69
end
def restrictions
nil
end
def available_features
[]
end
def plan
"markasoftware_free_enterprise_mode"
end
def features
[]
end
def version
69
end
end.new
end
def will_expire?
false
end
def mail
"[email protected]"
end
def subscriber
"markasoftware-free-enterprise-mode"
end
def company
"markasoftware"
end
def domain
"markasoftware.com"
end
def issued_at
Time.zone.today - 1
end
def starts_at
Time.zone.today - 1
end
def expires_at
Time.zone.today + 1
end
def reprieve_days
nil
end
def reprieve_days_left
69
end
def restrictions
nil
end
def available_features
[]
end
def plan
"markasoftware_free_enterprise_mode"
end
def features
[]
end
def version
69
end
def allows_to?(action)
true
end
def expired?(reprieve: true)
false
end
def invalid_domain?
false
end
end
@samip5
Copy link

samip5 commented Jul 18, 2025

@samip5 or @markasoftware Can you confirm to me if you can enable highlighting on work package table configuration?

You could just play with the features thing in the model..

@javiervalerocelada
Copy link

@samip5 or @markasoftware Can you confirm to me if you can enable highlighting on work package table configuration?

You could just play with the features thing in the model..

Puffff, really i think that this is generated by new configuration in the file: enterprise_token so that i will have to waiting to solution of @markasoftware

@samip5
Copy link

samip5 commented Jul 18, 2025

So as I suspected, one needs to just play with the features things on the model. This seems to work, and the token page is also accessible: https://github.com/skyssolutions/containers/blob/1a1ba1e3e730c2192755f0470473b66a4f524fc5/apps/openproject/enterprise.rb
Container with the patch is at: ghcr.io/skyssolutions/openproject:16.2.0@sha256:f6ed2ec546eaf0159eed2e8b7cb81d59054806765582c3d81eb0d2de0b6fe28e

@javiervalerocelada
Copy link

Así que, como sospechaba, hay que jugar con las características del modelo. Esto parece funcionar, y también se puede acceder a la página del token: https://github.com/skyssolutions/containers/blob/1a1ba1e3e730c2192755f0470473b66a4f524fc5/apps/openproject/enterprise.rb contenedor con el parche está en: ghcr.io/skyssolutions/openproject:16.2.0@sha256:f6ed2ec546eaf0159eed2e8b7cb81d59054806765582c3d81eb0d2de0b6fe28e

ok, i have update to your file enterprise_token.rb and i can to access to token page but in page of workpackages list, filter, the option higtlighting color is disabled. Can you help me?

@samip5
Copy link

samip5 commented Jul 18, 2025

Así que, como sospechaba, hay que jugar con las características del modelo. Esto parece funcionar, y también se puede acceder a la página del token: https://github.com/skyssolutions/containers/blob/1a1ba1e3e730c2192755f0470473b66a4f524fc5/apps/openproject/enterprise.rb contenedor con el parche está en: ghcr.io/skyssolutions/openproject:16.2.0@sha256:f6ed2ec546eaf0159eed2e8b7cb81d59054806765582c3d81eb0d2de0b6fe28e

ok, i have update to your file enterprise_token.rb and i can to access to token page but in page of workpackages list, filter, the option higtlighting color is disabled. Can you help me?

I don’t use those so no.

@javiervalerocelada
Copy link

@markasoftware i have update to file enterprise_token.rb and i can to access to token page but in page of workpackages list, filter, the option higtlighting color is disabled. Can you help me?

@javiervalerocelada
Copy link

Solemone can tell me if it is working highlighting on 16.2 and this case send me his version of enterprise_token.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment