def acknowledgeFileIssue(self, fileHash, rationale): """Acknowledges an issue of a file. This URL *must* be behind SSO and only in the admin group can call this. Called from offline, by the shifter normally. """ logging.debug("server::acknowledgeFileIssue(%s, %s)", fileHash, rationale) dropBox.acknowledgeFileIssue(fileHash, shibboleth.getUsername(), rationale)
def acknowledgeFileIssue(self, fileHash, rationale): '''Acknowledges an issue of a file. This URL *must* be behind SSO and only in the admin group can call this. Called from offline, by the shifter normally. ''' logging.debug('server::acknowledgeFileIssue(%s, %s)', fileHash, rationale) dropBox.acknowledgeFileIssue(fileHash, shibboleth.getUsername(), rationale)
def signInSSO(self): '''Signs in a user via the CERN SSO: this URL *must* be behind it. Called from offline by the upload script, as the first authentication method. If SSO fails, the script fallbacks to the winservices SOAP one. ''' logging.debug('server::signInSSO()') username = shibboleth.getUsername() cherrypy.session['username'] = username logging.info('signInSSO(): User %s signed in.', username)
def signInSSO(self): """Signs in a user via the CERN SSO: this URL *must* be behind it. Called from offline by the upload script, as the first authentication method. If SSO fails, the script fallbacks to the winservices SOAP one. """ logging.debug("server::signInSSO()") username = shibboleth.getUsername() cherrypy.session["username"] = username logging.info("signInSSO(): User %s signed in.", username)
def index(self): return self.templates['index'].render( username = shibboleth.getUsername(), )
def index(self): return self.templates['index'].render( username=shibboleth.getUsername(), )
def getDefaultTabs(): # In the userLog: # If the user receives all the notifications, by default show all the entries. # If not, by default show only those for him. defaultUserLogSearch = '' if 'cms-cond-dropbox-notifications' not in shibboleth.getGroups(): defaultUserLogSearch = shibboleth.getUsername() sortedTabs = ['userLog', 'runLog', 'fileLog', 'fileAcks', 'files', 'emails'] tabs = { 'userLog': { 'title': 'Log with the most useful information for users (last week)', 'headers': [ 'Hash', 'Last update', 'User', 'File', 'Status', 'Acknowledged', 'Metadata', 'User Text', 'Backend', 'Log', ], 'dataTablesInit': ''' "aaSorting": [[1, 'desc']], "oSearch": { "sSearch": "%s" } ''' % defaultUserLogSearch, 'transform': { 'Hash': getShortHash, 'File': getShortFile, 'Status': getStatusCodeHumanStringUser, 'Acknowledged': getAcknowledged, 'Metadata': getShortText, 'User Text': getShortText, 'Log': getFileLogLink, }, 'table': getUserLogs(), }, 'runLog': { 'title': 'Logs of each run of the dropBox (last week)', 'headers': [ 'creationTimestamp', 'backend', 'statusCode', 'fcsRun', 'hltRun', 'modificationTimestamp', 'downloadLog', 'globalLog', ], 'transform': { 'statusCode': getStatusCodeHumanString, 'downloadLog': getRunDownloadLogLink, 'globalLog': getRunGlobalLogLink, }, 'table': getRunLogs(), }, 'fileLog': { 'title': 'Logs of each file (request) processed by the dropBox (last week)', 'headers': [ 'fileHash', 'statusCode', 'metadata', 'userText', 'runLogCreationTimestamp', 'creationTimestamp', 'modificationTimestamp', 'log', ], 'dataTablesInit': ''' "aaSorting": [[5, 'desc']] ''', 'transform': { 'statusCode': getStatusCodeHumanString, 'log': getFileLogLink, }, 'table': getFileLogs(), }, 'fileAcks': { 'title': 'Logs of acknowledges for issues in files (requests) processed by the dropBox (last week)', 'headers': [ 'fileHash', 'username', 'rationale', 'creationTimestamp', 'modificationTimestamp' ], 'dataTablesInit': ''' "aaSorting": [[3, 'desc']] ''', 'table': getFileAcks(), }, 'files': { 'title': 'All files (requests) of the dropBox (last week)', 'headers': [ 'fileHash', 'state', 'backend', 'username', 'fileName', 'creationTimestamp', 'modificationTimestamp' ], 'dataTablesInit': ''' "aaSorting": [[5, 'desc']] ''', 'table': getFiles(), }, 'emails': { 'title': 'Queue of emails to be sent by the dropBox (last week)', 'headers': [ 'id', 'subject', 'fromAddress', 'toAddresses', 'ccAddresses', 'creationTimestamp', 'modificationTimestamp' ], 'table': getEmails(), }, } return (sortedTabs, tabs)