def _checkProtection(self): hasRights = RCCollaborationAdmin.hasRights(self) or \ RCCollaborationPluginAdmin.hasRights(self, None, [self._bookingPlugin]) or \ RCVideoServicesManager.hasRights(self, [self._bookingPlugin]) if not hasRights: CollaborationBase._checkProtection(self)
def _checkProtection(self): hasRights = ( RCCollaborationAdmin.hasRights(self) or RCCollaborationPluginAdmin.hasRights(self, None, [self._bookingPlugin]) or RCVideoServicesManager.hasRights(self, [self._bookingPlugin]) ) if not hasRights: CollaborationBase._checkProtection(self)
def _checkCanManagePlugin(self, plugin): isAdminOnlyPlugin = CollaborationTools.isAdminOnlyPlugin(plugin) hasAdminRights = RCCollaborationAdmin.hasRights(self) or \ RCCollaborationPluginAdmin.hasRights(self, None, [plugin]) if not hasAdminRights and isAdminOnlyPlugin: raise CollaborationException(_("Cannot acces service of admin-only plugin if user is not admin, for event: ") + str(self._conf.getId()) + _(" with the service ") + str(self.__class__) ) elif not hasAdminRights and not RCVideoServicesManager.hasRights(self, [plugin]): #we check if it's an event creator / manager (this will call ConferenceModifBase._checkProtection) CollaborationBase._checkProtection(self)
def _checkCanManagePlugin(self, plugin): isAdminOnlyPlugin = CollaborationTools.isAdminOnlyPlugin(plugin) hasAdminRights = RCCollaborationAdmin.hasRights(self) or \ RCCollaborationPluginAdmin.hasRights(self, None, [plugin]) if not hasAdminRights and isAdminOnlyPlugin: raise CollaborationException( _("Cannot acces service of admin-only plugin if user is not admin, for event: " ) + str(self._conf.getId()) + _(" with the service ") + str(self.__class__)) elif not hasAdminRights and not RCVideoServicesManager.hasRights( self, [plugin]): #we check if it's an event creator / manager (this will call ConferenceModifBase._checkProtection) CollaborationBase._checkProtection(self)
def _checkProtection(self): if not RCVideoServicesManager.hasRights(self): CollaborationBase._checkProtection(self)