The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/authorization/client/startup.js

18 lines
547 B

import { Meteor } from 'meteor/meteor';
import { hasAtLeastOnePermission } from './hasPermission';
import { CachedCollectionManager } from '../../ui-cached-collection';
import { AdminBox } from '../../ui-utils/client/lib/AdminBox';
Meteor.startup(() => {
CachedCollectionManager.onLogin(() => Meteor.subscribe('roles'));
AdminBox.addOption({
href: 'admin-permissions',
i18nLabel: 'Permissions',
icon: 'lock',
permissionGranted() {
return hasAtLeastOnePermission(['access-permissions', 'access-setting-permissions']);
},
});
});