feat(access): URL route for model access.Company

ref: #761 #760
This commit is contained in:
2025-05-15 18:34:17 +09:30
parent 53f99f620c
commit b2d1903009
2 changed files with 34 additions and 17 deletions

View File

@ -587,9 +587,33 @@ class ReactUIMetadata(OverRideJSONAPIMetadata):
}
})
if request.feature_flag['2025-00002']:
if request.feature_flag['2025-00003']:
nav['access']['pages'].update({
'view_role': {
"display_name": "Roles",
"name": "roles",
"icon": 'roles',
"link": "/access/role"
}
})
if request.feature_flag['2025-00008']:
nav['access']['pages'].update({
'view_company': {
"display_name": "Companies",
"name": "organization",
"icon": 'organization',
"link": "/access/company"
}
})
nav['access']['pages'].update({
'view_contact': {
"display_name": "Directory",
@ -598,6 +622,7 @@ class ReactUIMetadata(OverRideJSONAPIMetadata):
}
})
if request.feature_flag['2025-00005']:
nav['human_resources']['pages'].update({
@ -610,17 +635,6 @@ class ReactUIMetadata(OverRideJSONAPIMetadata):
})
if request.feature_flag['2025-00003']:
nav['access']['pages'].update({
'view_role': {
"display_name": "Roles",
"name": "roles",
"icon": 'roles',
"link": "/access/role"
}
})
if request.feature_flag['2025-00004']:
nav['accounting']['pages'].update({

View File

@ -162,15 +162,18 @@ entity_type_names = str(entity_type_names)[:-1]
router.register('access', access_v2.Index, basename='_api_v2_access_home')
router.register('access/(?P<entity_model>[company]+)', entity.ViewSet, feature_flag = '2025-00008', basename='_api_v2_company')
router.register(f'access/entity/(?P<entity_model>[{entity_type_names}]+)?', entity.ViewSet, feature_flag = '2025-00002', basename='_api_v2_entity_sub')
router.register('access/entity', entity.NoDocsViewSet, feature_flag = '2025-00002', basename='_api_v2_entity')
router.register('access/entity/(?P<model_id>[0-9]+)/notes', entity_notes.ViewSet, feature_flag = '2025-00002', basename='_api_v2_entity_note')
router.register('access/organization', organization_v2.ViewSet, basename='_api_v2_organization')
router.register('access/organization/(?P<model_id>[0-9]+)/notes', organization_notes.ViewSet, basename='_api_v2_organization_note')
router.register('access/organization/(?P<organization_id>[0-9]+)/team', team_v2.ViewSet, basename='_api_v2_organization_team')
router.register('access/organization/(?P<organization_id>[0-9]+)/team/(?P<model_id>[0-9]+)/notes', team_notes.ViewSet, basename='_api_v2_team_note')
router.register('access/organization/(?P<organization_id>[0-9]+)/team/(?P<team_id>[0-9]+)/user', team_user_v2.ViewSet, basename='_api_v2_organization_team_user')
router.register('access/tenant', organization_v2.ViewSet, basename='_api_v2_organization')
router.register('access/tenant/(?P<model_id>[0-9]+)/notes', organization_notes.ViewSet, basename='_api_v2_organization_note')
router.register('access/tenant/(?P<organization_id>[0-9]+)/team', team_v2.ViewSet, basename='_api_v2_organization_team')
router.register('access/tenant/(?P<organization_id>[0-9]+)/team/(?P<model_id>[0-9]+)/notes', team_notes.ViewSet, basename='_api_v2_team_note')
router.register('access/tenant/(?P<organization_id>[0-9]+)/team/(?P<team_id>[0-9]+)/user', team_user_v2.ViewSet, basename='_api_v2_organization_team_user')
router.register('access/role', role.ViewSet, feature_flag = '2025-00003', basename='_api_v2_role')
router.register('access/role/(?P<model_id>[0-9]+)/notes', role_notes.ViewSet, feature_flag = '2025-00003', basename='_api_v2_role_note')