Skip to content

Commit

Permalink
Merge pull request #72 from MPrevide/permissions
Browse files Browse the repository at this point in the history
Add permissions for /import,  /export and firmware images endpoints
  • Loading branch information
mprevide committed Jan 23, 2019
2 parents 9251ccf + 00a7137 commit 78aa95e
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions auth/initialConf.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,19 @@ def create_permissions():
permission_dict_helper('ro_history', "/history/(.*)", "GET"),
permission_dict_helper('all_metric', "/metric/(.*)", "(.*)"),
permission_dict_helper('ro_metric', "/metric/(.*)", "GET"),
permission_dict_helper('all_mashup', "/mashup/(.*)", "(.*)"),
permission_dict_helper('ro_mashup', "/mashup/(.*)", "GET"),
permission_dict_helper('all_user', "/auth/user/(.*)", "(.*)"),
permission_dict_helper('ro_user', "/auth/user/(.*)", "GET"),
permission_dict_helper('all_pap', "/pap/(.*)", "(.*)"),
permission_dict_helper('ro_pap', "/pap/(.*)", "GET"),
permission_dict_helper('ro_ca', "/ca/(.*)", "GET"),
permission_dict_helper('wo_sign', "/sign/(.*)", "POST"),
permission_dict_helper('ro_alarms', "/alarmmanager/(.*)", "GET"),
permission_dict_helper('ro_socketio', "/stream/socketio/", "GET")
permission_dict_helper('ro_socketio', "/stream/socketio/", "GET"),
permission_dict_helper('ro_import', "/import/(.*)", "GET"),
permission_dict_helper('all_import', "/import/(.*)", "(.*)"),
permission_dict_helper('ro_export', "/export/(.*)", "GET"),
permission_dict_helper('all_export', "/export/(.*)", "(.*)"),
permission_dict_helper('ro_image', "/fw-image/(.*)", "GET"),
permission_dict_helper('all_image', "/fw-image/(.*)", "(.*)")
]

for p in predef_perms:
Expand Down Expand Up @@ -163,11 +166,12 @@ def add_permissions_group():
'all_flows',
'all_history',
'all_metric',
'all_mashup',
'ro_alarms',
'ro_ca',
'wo_sign',
"ro_socketio"
"ro_socketio",
"all_import",
"all_export",
"all_image"
]
}
]
Expand Down

0 comments on commit 78aa95e

Please sign in to comment.