Merge "Follow-up access rules restrictions change"

This commit is contained in:
Zuul 2023-08-29 02:32:42 +00:00 committed by Gerrit Code Review
commit 011ed92ef0
1 changed files with 2 additions and 3 deletions

View File

@ -93,9 +93,8 @@ class ShareAccessesController(wsgi.Controller, wsgi.AdminActionsMixin):
enable_ceph=True,
enable_ipv6=True)
access_level = search_opts.get('access_level')
if ('access_level' in search_opts and (
search_opts['access_level'] not in constants.ACCESS_LEVELS)):
access_level = search_opts.get('access_level', None)
if access_level and access_level not in constants.ACCESS_LEVELS:
raise exception.InvalidShareAccessLevel(level=access_level)
@wsgi.Controller.authorize('index')