Esempio n. 1
0
 def _checkParams(self):
     AdminService._checkParams(self)
     pm = ParameterManager(self._params)
     user_id = pm.extract("userId", pType=int, allowEmpty=False)
     self._user = User.get(user_id)
     if self._user is None:
         raise NoReportError(_("The user that you are trying to login as does not exist anymore in the database"))
Esempio n. 2
0
 def _checkParams(self):
     AdminService._checkParams(self)
     pm = ParameterManager(self._params)
     self._userId = pm.extract("userId", pType=str, allowEmpty=False)
     self._av = AvatarHolder().getById(self._userId)
     if self._av == None:
         raise ServiceError("ER-U0", _("Cannot find user with id %s") % self._userId)
Esempio n. 3
0
File: oauth.py Progetto: NIIF/indico
 def _checkParams(self):
     AdminService._checkParams(self)
     self._pm = ParameterManager(self._params)
     consumerKey = self._pm.extract("consumer_key", pType=str, allowEmpty=False)
     if not ConsumerHolder().hasKey(consumerKey):
         raise ServiceError("", _("Consumer key not found"))
     self._consumer = ConsumerHolder().getById(consumerKey)
Esempio n. 4
0
File: admin.py Progetto: Ictp/indico
 def _checkParams(self):
     AdminService._checkParams(self)
     pm = ParameterManager(self._params)
     self._userId = pm.extract("userId", pType=str, allowEmpty=False)
     self._av = AvatarHolder().getById(self._userId)
     if self._av == None:
         raise NoReportError(_("The user that you are trying to login as does not exist anymore in the database"))
Esempio n. 5
0
    def _checkParams(self):
        AdminService._checkParams(self)

        pm = ParameterManager(self._params)

        self._title = pm.extract("title", pType=str, allowEmpty=False)
        self._type = pm.extract("type", pType=str, allowEmpty=False)
        self._content = pm.extract("content", pType=str, allowEmpty=True)
Esempio n. 6
0
 def _checkParams(self):
     AdminService._checkParams(self)
     pm = ParameterManager(self._params)
     self._wm = webcast.HelperWebcastManager.getWebcastManagerInstance()
     self._userId = pm.extract("userId", pType=str, allowEmpty=False)
     self._pr = PrincipalHolder().getById(self._userId)
     if self._pr == None:
         raise ServiceError("ER-U0", _("Cannot find user with id %s") % self._userId)
Esempio n. 7
0
 def _checkParams(self):
     AdminService._checkParams(self)
     self._pm = ParameterManager(self._params)
     gh = GroupHolder()
     groupId = self._pm.extract("groupId", pType=str, allowEmpty=False)
     self._group = gh.getById(groupId)
     if self._group == None:
         raise ServiceError("ER-G0", _("Cannot find group with id %s") % groupId)
Esempio n. 8
0
 def _checkParams(self):
     AdminService._checkParams(self)
     self._pm = ParameterManager(self._params)
     userId = self._pm.extract("userId", pType=str, allowEmpty=True)
     if userId is not None:
         ah = user.AvatarHolder()
         self._avatar = ah.getById(userId)
     else:
         self._avatar = self._aw.getUser()
Esempio n. 9
0
 def _checkParams(self):
     AdminService._checkParams(self)
     self.schedModule = ModuleHolder().getById('scheduler')
Esempio n. 10
0
 def _checkParams(self):
     AdminService._checkParams(self)
     self._pm = ParameterManager(self._params)
     user_id = self._pm.extract("userId", pType=int, allowEmpty=True)
     self._user = User.get(user_id) if user_id is not None else session.user
Esempio n. 11
0
 def _checkParams(self):
     self._pm = ParameterManager(self._params)
     AdminService._checkParams(self)
     self._id = self._pm.extract('id', pType=str)
     self._sm = SyncManager.getDBInstance()
     self._agent = self._sm.getAllAgents()[self._id]
Esempio n. 12
0
 def _checkProtection(self):
     if not RCCollaborationAdmin.hasRights(self, None):
         AdminService._checkProtection(self)
Esempio n. 13
0
 def _checkParams(self):
     AdminService._checkParams(self)
     if not PluginsHolder().hasPluginType("Collaboration"):
         raise CollaborationServiceException(_("Collaboration plugin system is not active"))
Esempio n. 14
0
    def _checkParams(self):
        AdminService._checkParams(self)

        pm = ParameterManager(self._params)

        self._id = pm.extract("id", pType=str, allowEmpty=False)
Esempio n. 15
0
 def _checkParams(self):
     AdminService._checkParams(self)
     ph = PluginsHolder()
     self._targetOption = ph.getPluginType("EPayment").getOption("customCurrency")
     self._currencyName = self._params.get("name", None)
     self._currencies = self._targetOption.getValue()
Esempio n. 16
0
 def _checkParams(self):
     AdminService._checkParams(self)
     self._pm = ParameterManager(self._params)
     self._agent = self._pm.extract('agent', pType=str)
Esempio n. 17
0
 def _checkParams(self):
     AdminService._checkParams(self)
     pm = ParameterManager(self._params)
     self._userList = pm.extract("userList", pType=list, allowEmpty=False)
Esempio n. 18
0
 def _checkParams(self):
     AdminService._checkParams(self)
     pm = ParameterManager(self._params)
     self._wm = webcast.HelperWebcastManager.getWebcastManagerInstance()
     self._userList = pm.extract("userList", pType=list, allowEmpty=False)
Esempio n. 19
0
 def _checkParams(self):
     AdminService._checkParams(self)
     pm = ParameterManager(self._params)
     self._userId = pm.extract("userId", pType=int, allowEmpty=False)
Esempio n. 20
0
 def _checkParams(self):
     AdminService._checkParams(self)
     self._pm = ParameterManager(self._params)
Esempio n. 21
0
File: oauth.py Progetto: NIIF/indico
 def _checkParams(self):
     AdminService._checkParams(self)
     pm = ParameterManager(self._params)
     self._consumerName = pm.extract("consumer_name", pType=str, allowEmpty=False)
Esempio n. 22
0
 def _checkProtection(self):
     if not RCCollaborationAdmin.hasRights(self._getUser()):
         AdminService._checkProtection(self)
Esempio n. 23
0
    def _checkParams(self):
        AdminService._checkParams(self)

        pm = ParameterManager(self._params)

        self._id = pm.extract("id", pType=str, allowEmpty=False)