-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added privileges control in UI and user-add (#435)
* Internationalization With this changes the user can input international characters like á, ì and ç. * Sprint Checklist in correct Order Correction of the Checklist Order on a Sprint. Before: 1.1, 1.10, 1.2 Now: 1.1, 1.2, 1.10 * Correction of Codacy Issues Correction of unused variable and "Redefining built-in 'list'" Codacy issues. * Order in checklist page Order requirements in checklist page * Export failed requirement to Defect Dojo Now on the Failed requirements page, there is a button to export that requirements to Defect Dojo. * Buttons hidding acording to status Buttons hidding or not acordint to checklist status in Project-Summary. * Fixed Codacy issues of #430 Fixed Codacy issues of #430 * Error fix. Fix of error introduced by Codacy issue. * Codacy fix * Fix of issue #422 Fix of issue in which only admin can create projects and sprints. * Fix reordening issue 428 Using observable in Angular (thanks RiieCco) with finally making the call for the new list. * Codacy fixes * Added privileges control in UI and user-add Added some controls in the UI according to privileges of the user. Added select on Create User option. Fix of issue with privileges.query without privilegeID, that returns every privilege in login action.
- Loading branch information
1 parent
895fc61
commit 31d0bd2
Showing
17 changed files
with
113 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export class Privilege { | ||
constructor( | ||
privilege: string, | ||
privilegeID?: number | ||
){} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from flask import request | ||
from flask_restplus import Resource | ||
from skf.api.security import security_headers, validate_privilege | ||
from skf.api.user.business import list_privileges | ||
from skf.api.user.serializers import privilege_items, message | ||
from skf.api.user.parsers import authorization | ||
from skf.api.restplus import api | ||
|
||
ns = api.namespace('user', description='Operations related to users') | ||
|
||
|
||
@ns.route('/list_privileges') | ||
@api.response(404, 'Validation error', message) | ||
class userListPrivileges(Resource): | ||
|
||
@api.expect(authorization) | ||
@api.marshal_with(privilege_items) | ||
@api.response(400, 'No results found', message) | ||
def get(self): | ||
""" | ||
List available users. | ||
* Privileges required: **manage** | ||
""" | ||
validate_privilege(self, 'manage') | ||
result = list_privileges() | ||
return result, 200, security_headers() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters