-
Notifications
You must be signed in to change notification settings - Fork 492
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NAS-125187 / 24.04 / Allow limited users to interact with own jobs (#…
…12482) This commit alters behavior of job-related core plugin methods in the following ways: 1. Authorization is no longer required for core.get_jobs, core.job_wait, and core.job_abort. 2. Non-admin users calling core.get_jobs will only receive info about their own jobs 3. Non-admin users will only be able to wait for, abort, or modify their own jobs To achieve this a few minor changes were made: 1. Allowlist object now stores boolean indicating whether the allow list contained an unrestrained full access entry 2. TokenSessionManagerCredentials now contains a reference to the user info from the token's root (originating) credentials. 3. Job encoding now includes a `user` key that contains the username for user sessions. In case of API key or internal jobs, this will be None / null.
- Loading branch information
Showing
6 changed files
with
142 additions
and
9 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
7 changes: 7 additions & 0 deletions
7
src/middlewared/middlewared/plugins/account_/privilege_utils.py
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