def user_has_put_permission(self, conn): """Does the user have permission to write to the workspace on the storage device? """ # groupworkspace permission gws_permission = Backend._user_has_put_permission( self, conn.jdma_user, conn.jdma_workspace.workspace) return gws_permission
def user_has_put_permission(self, conn): """Check whether the user has permission to access the elastic tape, and whether they have permission from the groupworkspace """ # groupworkspace permission gws_permission = Backend._user_has_put_permission( self, conn.jdma_user, conn.jdma_workspace.workspace) # elastic tape permission - fetch from URL and use beautifulsoup to # parse the returned table into something meaningful et_permission = user_in_workspace(conn.jdma_user, conn.jdma_workspace.workspace, self.ET_Settings) return gws_permission & et_permission
def user_has_put_permission(self, conn): """Check whether the user has permission (via their access_key and secret_key) to access the object store, and whether they have permission from the groupworkspace """ # groupworkspace permission gws_permission = Backend._user_has_put_permission( self, conn.jdma_user, conn.jdma_workspace.workspace) # to validate the credentials we have to do some operation, as just # connecting the client doesn't do any validation! try: conn.list_buckets() s3_permission = True except Exception: s3_permission = False return gws_permission & s3_permission