Minor Ranger Changes
- rename cms table - remove authorization from get_region and list_regions in rms Change-Id: I8e85a2c2e34f61eb43ae6c0f0f655cdc42be10a1
This commit is contained in:
parent
87b2ddb084
commit
dd6e6609aa
@ -114,7 +114,7 @@ create table if not exists groups
|
||||
unique uuid_idx (uuid));
|
||||
|
||||
|
||||
create table if not exists group_region
|
||||
create table if not exists groups_region
|
||||
(
|
||||
region_id integer not null,
|
||||
group_id integer not null,
|
||||
|
@ -240,7 +240,7 @@ class RegionsController(rest.RestController):
|
||||
:exception: EntityNotFoundError 404
|
||||
"""
|
||||
logger.info("Entered Get Regions")
|
||||
authentication.authorize(request, 'region:get_all')
|
||||
authentication.authorize(request, 'region:get_all', skip_auth=True)
|
||||
|
||||
url_args = {'type': type, 'status': status, 'metadata': metadata,
|
||||
'rangerAgentVersion': rangerAgentVersion, 'clli': clli, 'regionname': regionname,
|
||||
@ -274,7 +274,7 @@ class RegionsController(rest.RestController):
|
||||
@wsexpose(RegionsData, str, status_code=200, rest_content_types='json')
|
||||
def get_one(self, id_or_name):
|
||||
logger.info("API: Entered get region by id or name: {}".format(id_or_name))
|
||||
authentication.authorize(request, 'region:get_one')
|
||||
authentication.authorize(request, 'region:get_one', skip_auth=True)
|
||||
|
||||
try:
|
||||
result = RegionService.get_region_by_id_or_name(id_or_name)
|
||||
|
@ -19,8 +19,8 @@ def get_keystone_ep(auth_region):
|
||||
return None
|
||||
|
||||
|
||||
def authorize(request, action):
|
||||
if not _is_authorization_enabled(conf):
|
||||
def authorize(request, action, skip_auth=False):
|
||||
if not _is_authorization_enabled(conf) or skip_auth:
|
||||
return
|
||||
|
||||
auth_region = request.headers.get('X-Auth-Region')
|
||||
|
Loading…
x
Reference in New Issue
Block a user