Skip to content
Snippets Groups Projects
Commit 91c17a1d authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Add permissions endpoint

parent 71c0820a
No related branches found
No related tags found
1 merge request!97fetch list analysis in fetch hook in order to not block page display while...
Pipeline #78445 passed
......@@ -931,6 +931,17 @@ class ProjectAnalysisViewSet(viewsets.ModelViewSet):
def perform_destroy(self, instance):
instance.delete()
@action(detail=False)
def permissions(self, request, pk=None, project_pk=None):
current_user = request.user
return Response(
[
perm.split(".")[1].split("_")[0]
for perm in current_user.get_all_permissions()
if perm.endswith("analysis")
]
)
@action(detail=True)
def lodscores(self, request, pk=None, project_pk=None):
# Get the lodscores
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment