def get_allowed_actions(user, actions):
# determine what actions are allowed here
logging.debug('Requested actions: {}'.format(actions))
# The three actions used by the registry are 'push', 'pull', and '*':
# https://github.com/docker/distribution/blob/master/registry/handlers/app.go#L875
allowed_actions = actions
# allowed_actions = []
# if 'pull' in actions:
# actions.remove('pull')
logging.debug('Allowed actions: {}'.format(allowed_actions))
return allowed_actions
评论列表
文章目录