-
Notifications
You must be signed in to change notification settings - Fork 14
[OGUI-1892] Disable level buttons for shifter users on page load and after #3438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
graduta
wants to merge
20
commits into
dev
from
feature/ILG/OGUI-1892-disable-level-buttons-for-shifter-users
Closed
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
3f14a80
Refactor filter button components into reusable
graduta cd8c76d
Provide filters from model instead of hardcoded
graduta fdfab13
Add util function for checking if user has shifter but no admin role
graduta 28efc39
On URL load, ensure shifters use only OPS level
graduta caa7eec
Fix eslint warnings in changed files
graduta 9031c35
Extract access util function
graduta 78c22c0
Add tests for shifter based roles
graduta b631069
Add documentation for role-based
graduta 8c6e7d6
Include newly added test suite
graduta 6337802
Fix eslint in mocha-index
graduta 78b27f3
Improve newly added consts
graduta 38e4d4b
Merge branch 'dev' into feature/ILG/OGUI-1892-disable-level-buttons-f…
graduta 4ea774e
Merge branch 'dev' into feature/ILG/OGUI-1892-disable-level-buttons-f…
graduta 746724d
Merge branch 'dev' of github.com:AliceO2Group/WebUi into feature/ILG/…
graduta 328e93e
Use const instead of hard-coded string
graduta 49ac19f
Merge branch 'feature/ILG/OGUI-1892-disable-level-buttons-for-shifter…
graduta d2cbf11
Add constraints to filter logic to be applied per user role
graduta 921590a
Display label rather than index (null)
graduta fb9b317
Merge branch 'dev' of github.com:AliceO2Group/WebUi into feature/ILG/…
graduta b5ff6e2
Update tests for edge cases
graduta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,45 @@ | ||
| /** | ||
| * @license | ||
| * Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| * See http://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| * All rights not expressly granted are reserved. | ||
| * | ||
| * This software is distributed under the terms of the GNU General Public | ||
| * License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| * | ||
| * In applying this license CERN does not waive the privileges and immunities | ||
| * granted to it by virtue of its status as an Intergovernmental Organization | ||
| * or submit itself to any jurisdiction. | ||
| */ | ||
|
|
||
| /** | ||
| * Object containing the different levels of logs that can be displayed in the application, | ||
| * with their label and index as in the database | ||
| * These values are as per InfoLogger defined levels: | ||
| * {@link https://github.com/AliceO2Group/InfoLogger/blob/master/doc/README.md} | ||
| */ | ||
| export const InfoLoggerLevel = Object.freeze({ | ||
| OPS: { | ||
| label: 'Ops', | ||
| index: 1, | ||
| }, | ||
| SUPPORT: { | ||
| label: 'Support', | ||
| index: 6, | ||
| }, | ||
| DEVEL: { | ||
| label: 'Devel', | ||
| index: 11, | ||
| }, | ||
| TRACE: { | ||
| label: 'Trace', | ||
| index: null, | ||
| }, | ||
| }); | ||
|
|
||
| /** | ||
| * Array containing the different levels of logs that can be displayed in the application, | ||
| * with their label and index as in the database, used for iterating over the levels in the UI | ||
| * These values are as per InfoLogger defined levels: | ||
| */ | ||
| export const INFOLOGGER_LEVEL_LIST = Object.values(InfoLoggerLevel); |
This file contains hidden or 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,22 @@ | ||
| /** | ||
| * @license | ||
| * Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| * See http://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| * All rights not expressly granted are reserved. | ||
| * | ||
| * This software is distributed under the terms of the GNU General Public | ||
| * License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| * | ||
| * In applying this license CERN does not waive the privileges and immunities | ||
| * granted to it by virtue of its status as an Intergovernmental Organization | ||
| * or submit itself to any jurisdiction. | ||
| */ | ||
|
|
||
| /** | ||
| * Object containing the different roles that a user can have in the application, used for checking | ||
| * permissions and access levels. These roles are defined in CERN Application Service | ||
| */ | ||
| export const Role = Object.freeze({ | ||
| SHIFTER: 'shifter', | ||
| ADMIN: 'admin', | ||
| }); |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.