Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
306220d
Implementation of RBAC for KeyValuePair
ashwini-orchestral Sep 9, 2021
09a0218
Resolved formatting issue
ashwini-orchestral Sep 9, 2021
0627467
Added a comment
ashwini-orchestral Sep 9, 2021
ed9c0d5
Modifications done as per review comments
ashwini-orchestral Sep 16, 2021
242f230
Fixed review changes
ashwini-orchestral Sep 17, 2021
bd1adf3
Minor fix
ashwini-orchestral Sep 17, 2021
1ae5b94
Merge branch 'master' into rbac_keyvaluepair
ashwini-orchestral Sep 17, 2021
faeb378
Modified the implementation for default user
ashwini-orchestral Sep 22, 2021
7bc6613
Merge branch 'master' into rbac_keyvaluepair
ashwini-orchestral Sep 23, 2021
2f17754
Fixed lint error
ashwini-orchestral Sep 23, 2021
1c77ff7
Minor fix to handle system key permissions to user.
ashwini-orchestral Sep 23, 2021
a2e7178
Merge branch 'master' into rbac_keyvaluepair
ashwini-orchestral Sep 24, 2021
1a871d0
Added a function to get the list keys of user for system scoped kvps
ashwini-orchestral Sep 24, 2021
57a7808
Modified get_all function to get the list of user assigned system sco…
ashwini-orchestral Sep 24, 2021
4dedb78
Minor fix to add imports
ashwini-orchestral Sep 24, 2021
691c7aa
Minor fix to add import
ashwini-orchestral Sep 24, 2021
da1d6bd
Minor fix related to lint error
ashwini-orchestral Sep 24, 2021
b39855d
Minor fix related to conflict
ashwini-orchestral Sep 24, 2021
1d62db8
Reformatted file with black tool
ashwini-orchestral Sep 24, 2021
f244569
Minor fix for users system scope key list
ashwini-orchestral Sep 27, 2021
5270fcb
Added testcases for user permission with system scope kvps.
ashwini-orchestral Sep 27, 2021
7f7635f
Fixed lint error
ashwini-orchestral Sep 27, 2021
eef5655
Fixed minor variable issue
ashwini-orchestral Sep 27, 2021
092723a
Added unit tests for user permission
ashwini-orchestral Sep 27, 2021
b63319c
Minor fix related to lint error
ashwini-orchestral Sep 27, 2021
88db871
Minor fix related to import
ashwini-orchestral Sep 27, 2021
eab3555
Refactor KeyValuePair get_all method in API controller
m4dcoder Sep 30, 2021
07ac6f8
Refactor the get_one, put, delete for KVP
ashwini-orchestral Sep 30, 2021
7544f95
Modified unit tests to add multiple users and roles for KVP
ashwini-orchestral Sep 30, 2021
c04b7a5
Modified method to return only keyvaluepair keys
ashwini-orchestral Sep 30, 2021
0881982
Modified unit tests for multiple users and roles kvp
ashwini-orchestral Sep 30, 2021
6a9e1e4
Fixed lint error
ashwini-orchestral Sep 30, 2021
3649ef9
Fixed lint error
ashwini-orchestral Sep 30, 2021
c7250f7
Fixed lint error
ashwini-orchestral Sep 30, 2021
6c12ef7
Rollback changes to get_all for key value API
m4dcoder Sep 30, 2021
6522420
Refactor and simplify get_one method of key value API
m4dcoder Oct 1, 2021
ea5bf2e
Fix kvp unit tests to be more dynamic in asserting list
m4dcoder Oct 1, 2021
fafe328
Add observer support to get_all for key value API
m4dcoder Oct 2, 2021
0dbae40
Refactor and simplify put method of key value API
m4dcoder Oct 3, 2021
f9b2c3c
Minor black formatting changes
m4dcoder Oct 3, 2021
77632eb
Refactor and simplify delete method of key value API
m4dcoder Oct 3, 2021
9189455
Refactor get_all_system_kvp_names_for_user with more restriction
m4dcoder Oct 3, 2021
66989cc
Refactor RBAC unit tests for the key value API
m4dcoder Oct 3, 2021
fa38953
Merge remote-tracking branch 'origin' into rbac_keyvaluepair
m4dcoder Oct 3, 2021
ec3a184
Fixed minor issue of CLI command
ashwini-orchestral Oct 4, 2021
b9309e5
Removed commented line
ashwini-orchestral Oct 5, 2021
51b580c
Merge branch 'master' into rbac_keyvaluepair
ashwini-orchestral Oct 5, 2021
a2e51f4
Merge branch 'master' into rbac_keyvaluepair
ashwini-orchestral Oct 28, 2021
816e6ba
Merge branch 'master' into rbac_keyvaluepair
m4dcoder Dec 9, 2021
1747eee
Merge branch 'master' into rbac_keyvaluepair
ashwini-orchestral Dec 10, 2021
d32a7f3
Updated changelog for RBAC keyvaluepair
ashwini-orchestral Dec 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions st2client/st2client/commands/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import six
import json
import logging
import traceback

from functools import wraps

Expand Down Expand Up @@ -198,10 +197,12 @@ def get_resource_by_pk(self, pk, **kwargs):
try:
instance = self.manager.get_by_id(pk, **kwargs)
except Exception as e:
traceback.print_exc()
# traceback.print_exc()
# Hack for "Unauthorized" exceptions, we do want to propagate those
response = getattr(e, "response", None)
status_code = getattr(response, "status_code", None)
if status_code and status_code == http_client.FORBIDDEN:
raise e
if status_code and status_code == http_client.UNAUTHORIZED:
raise e

Expand Down