chore: Introduce enterprise edition license (#3209)
- Initialize an "enterprise" folder that is copyrighted. - You can remove this folder and the system will continue functioning normally, in case you want a purely MIT licensed product. - Enable limit on the number of user accounts in enterprise code. - Use enterprise edition injector methods (inspired from Gitlab). - SaaS software would run enterprise edition software always. Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
36
enterprise/LICENSE
Normal file
36
enterprise/LICENSE
Normal file
@@ -0,0 +1,36 @@
|
||||
The Chatwoot Enterprise license (the “Enterprise License”)
|
||||
Copyright (c) 2017-2021 Chatwoot Inc
|
||||
|
||||
With regard to the Chatwoot Software:
|
||||
|
||||
This software and associated documentation files (the "Software") may only be
|
||||
used in production, if you (and any entity that you represent) have agreed to,
|
||||
and are in compliance with, the Chatwoot Subscription Terms of Service, available
|
||||
at https://www.chatwoot.com/terms-of-service/ (the “Enterprise Terms”), or other
|
||||
agreement governing the use of the Software, as agreed by you and Chatwoot,
|
||||
and otherwise have a valid Chatwoot Enterprise License for for the
|
||||
correct number of user seats. Subject to the foregoing sentence, you are free to
|
||||
modify this Software and publish patches to the Software. You agree that Chatwoot
|
||||
and/or its licensors (as applicable) retain all right, title and interest in and
|
||||
to all such modifications and/or patches, and all such modifications and/or
|
||||
patches may only be used, copied, modified, displayed, distributed, or otherwise
|
||||
exploited with a valid Chatwoot Enterprise subscription for the correct
|
||||
number of user seats. Notwithstanding the foregoing, you may copy and modify
|
||||
the Software for development and testing purposes, without requiring a
|
||||
subscription. You agree that Chatwoot and/or its licensors (as applicable) retain
|
||||
all right, title and interest in and to all such modifications. You are not
|
||||
granted any other rights beyond what is expressly stated herein. Subject to the
|
||||
foregoing, it is forbidden to copy, merge, publish, distribute, sublicense,
|
||||
and/or sell the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
For all third party components incorporated into the Chatwoot Software, those
|
||||
components are licensed under the original license provided by the owner of the
|
||||
applicable component.
|
||||
15
enterprise/app/models/enterprise/account.rb
Normal file
15
enterprise/app/models/enterprise/account.rb
Normal file
@@ -0,0 +1,15 @@
|
||||
module Enterprise::Account
|
||||
def usage_limits
|
||||
{
|
||||
agents: get_limits(:agents),
|
||||
inboxes: get_limits(:inboxes)
|
||||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def get_limits(limit_name)
|
||||
config_name = "ACCOUNT_#{limit_name.to_s.upcase}_LIMIT"
|
||||
self[:limits][limit_name.to_s] || GlobalConfig.get(config_name)[config_name] || ChatwootApp.max_limit
|
||||
end
|
||||
end
|
||||
2
enterprise/lib/enterprise.rb
Normal file
2
enterprise/lib/enterprise.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module Enterprise
|
||||
end
|
||||
Reference in New Issue
Block a user