Changeset 0e0c28 in indico


Ignore:
Timestamp:
12/03/09 18:37:08 (4 years ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, burotel, hello-world-walkthrough, ipv6, new-webex, prov-dual-interface, v0.97-series, v0.98-series, v0.98.2, v0.98.3, v0.98b1, v0.98b2, v0.99, b8c30da8ebdbdcbd675a873997cc3e95f567de49, 4287315ec967a3da168d83963c14001db8487d53
Children:
df3d1f
Parents:
5db6c7
Message:

[FIXED] Webcast admins access

fixes #78: Webcast admins should have access rights to every event
fixes #79: Webcast admins should see the "Video Services Overview"

Location:
indico/MaKaC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/services/implementation/collaboration.py

    r8126f9 r0e0c28  
    237237    """ 
    238238    """ 
     239     
     240    def _checkProtection(self): 
     241        if not RCCollaborationPluginAdmin.hasRights(self, None, "any"): 
     242            AdminCollaborationBase._checkProtection(self) 
     243             
    239244    def _checkParams(self): 
    240245        AdminCollaborationBase._checkParams(self) 
  • indico/MaKaC/webinterface/pages/collaboration.py

    r160fdf r0e0c28  
    374374            if b.canBeStarted(): 
    375375                ongoingBookings.append(b) 
    376             if b.getAdjustedStartDate('UTC') > nowutc(): 
     376            if b.getStartDate() and b.getAdjustedStartDate('UTC') > nowutc(): 
    377377                scheduledBookings.setdefault(b.getAdjustedStartDate(self._tz).date(), []).append(b) 
    378378                 
  • indico/MaKaC/webinterface/rh/collaboration.py

    r7f8da8 r0e0c28  
    5959        """ Returns True if the user is an admin of one of the plugins corresponding to pluginNames 
    6060            plugins: a list of Plugin objects (e.g. EVO, RecordingRequest) or strings with the plugin name ('EVO', 'RecordingRequest') 
     61                     or the string 'any' (we will then check if the user is manager of any plugin), 
    6162        """ 
    6263        if not PluginsHolder().hasPluginType("Collaboration"): 
     
    7071         
    7172        coll = PluginsHolder().getPluginType('Collaboration') 
     73         
     74        if plugins == 'any': 
     75            plugins = [] 
     76            for p in CollaborationTools.getCollaborationPluginType().getPluginList(): 
     77                plugins.append(p.getName()) 
    7278         
    7379        if plugins: 
     
    142148        if not PluginsHolder().hasPluginType("Collaboration"): 
    143149            raise PluginError("Collaboration plugin system is not active") 
    144         if not RCCollaborationAdmin.hasRights(self, None): #and not RCCollaborationPluginAdmin.hasRights(self, None, self._tabPlugins) 
     150         
     151        if not RCCollaborationAdmin.hasRights(self, None) and not RCCollaborationPluginAdmin.hasRights(self, plugins = "any"): #RCCollaborationPluginAdmin.hasRights(self, None, self._tabPlugins): 
    145152            RHAdminBase._checkProtection(self) 
    146153             
  • indico/MaKaC/webinterface/rh/conferenceDisplay.py

    r931922 r0e0c28  
    392392 
    393393    def _checkProtection( self ): 
    394         RHDisplayBaseProtected._checkProtection( self ) 
     394        from MaKaC.webinterface.rh.collaboration import RCCollaborationAdmin, RCCollaborationPluginAdmin 
     395        if not RCCollaborationAdmin.hasRights(self, None) and \ 
     396            not RCCollaborationPluginAdmin.hasRights(self, plugins = "any"):  
     397            RHDisplayBaseProtected._checkProtection( self ) 
    395398 
    396399 
  • indico/MaKaC/webinterface/wcomponents.py

    rc174b7 r0e0c28  
    365365                adminItemList.append({'url': urlHandlers.UHAdminArea.getURL(), 'text': _("Server admin")}) 
    366366            if PluginsHolder().hasPluginType("Collaboration"): 
    367                 from MaKaC.webinterface.rh.collaboration import RCCollaborationAdmin 
    368                 if (self._currentuser.isAdmin() or RCCollaborationAdmin.hasRights(user = self._currentuser)) and CollaborationTools.anyPluginsAreActive(): 
     367                from MaKaC.webinterface.rh.collaboration import RCCollaborationAdmin, RCCollaborationPluginAdmin 
     368                if (self._currentuser.isAdmin() or RCCollaborationAdmin.hasRights(user = self._currentuser) or RCCollaborationPluginAdmin.hasRights(user = self._currentuser, plugins = "any")) and CollaborationTools.anyPluginsAreActive(): 
    369369                    adminItemList.append({'url': urlHandlers.UHAdminCollaboration.getURL(), 'text': _("Video Services Overview")}) 
    370370            if webcast.HelperWebcastManager.getWebcastManagerInstance().isManager(self._currentuser): 
Note: See TracChangeset for help on using the changeset viewer.