Skip to content
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

feat: Add more granular permissions based on tags #4250

Closed
wants to merge 15 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions docs/docs/system-administration/rbac.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,10 @@ Permissions can be assigned at four levels: user group, organisation, project, a
| Create Change Request | Allows creating change requests for features in this environment. |
| Approve Change Request | Allows approving or denying change requests in this environment. |
| View Identities | Grants read-only access to identities in this environment. |

### Tags

When tags are applied to a role, the permissions, Delete Feature and Update Feature States, are restricted to the
features that share the same tag. This allows for greater granularity in permission management, enabling organizations
to have better control over sets of features. By implementing a tagging system, users can only modify features relevant
to their work, thereby reducing the risk of unauthorized changes in other areas of the system.
6 changes: 5 additions & 1 deletion frontend/common/code-help/init/init-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ module.exports = (
) => `import ${LIB_NAME} from "${NPM_CLIENT}"; // Add this line if you're using ${LIB_NAME} via npm

${LIB_NAME}.init({
environmentID: "${envId}",${Constants.isCustomFlagsmithUrl ? `\n api: "${Project.flagsmithClientAPI}",` : ''}
environmentID: "${envId}",${
Constants.isCustomFlagsmithUrl
? `\n api: "${Project.flagsmithClientAPI}",`
: ''
}
onChange: (oldFlags, params) => { // Occurs whenever flags are changed
// Determines if the update came from the server or local cached storage
const { isFromServer } = params;
Expand Down
2 changes: 1 addition & 1 deletion frontend/common/code-help/traits/traits-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Constants from 'common/constants'

module.exports = (
envId,
{ FEATURE_NAME, TRAIT_NAME, LIB_NAME, NPM_NODE_CLIENT, USER_ID },
{ FEATURE_NAME, LIB_NAME, NPM_NODE_CLIENT, TRAIT_NAME, USER_ID },
userId,
) => `import Flagsmith from "${NPM_NODE_CLIENT}"; // Add this line if you're using ${LIB_NAME} via npm

Expand Down
Loading
Loading