flagsmith icon indicating copy to clipboard operation
flagsmith copied to clipboard

feat: Add tag based permissions

Open kyle-ssg opened this issue 1 year ago • 7 comments

Thanks for submitting a PR! Please check the boxes below:

  • [x] I have added information to docs/ if required so people know about the feature!
  • [x] I have filled in the "Changes" section below?
  • [x] I have filled in the "How did you test this code" section below?
  • [x] I have used a Conventional Commit title for this Pull Request

Changes

Supersedes https://github.com/Flagsmith/flagsmith/pull/4250

When setting project and environment level permissions, users will now be able to enable and specify tags that the permissions apply to. Specifying tags will only apply to certain permissions (see docs)

image

image

How did you test this code?

I'm not able to until https://github.com/Flagsmith/flagsmith/issues/4640 is sorted

kyle-ssg avatar Sep 18 '24 18:09 kyle-ssg

The latest updates on your projects. Learn more about Vercel for Git ↗︎

3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Nov 13, 2024 1:03pm
flagsmith-frontend-preview ⬜️ Ignored (Inspect) Visit Preview Nov 13, 2024 1:03pm
flagsmith-frontend-staging ⬜️ Ignored (Inspect) Visit Preview Nov 13, 2024 1:03pm

vercel[bot] avatar Sep 18 '24 18:09 vercel[bot]

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-4643 Finished :white_check_mark: Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-4643 Finished :white_check_mark: Skipped
ghcr.io/flagsmith/flagsmith-api:pr-4643 Finished :white_check_mark: Results :white_check_mark:
ghcr.io/flagsmith/flagsmith:pr-4643 Finished :white_check_mark: Results :white_check_mark:
ghcr.io/flagsmith/flagsmith-private-cloud:pr-4643 Finished :white_check_mark: Results :white_check_mark:
ghcr.io/flagsmith/flagsmith-frontend:pr-4643 Finished :white_check_mark: Results :white_check_mark:

github-actions[bot] avatar Sep 18 '24 18:09 github-actions[bot]

Uffizzi Preview deployment-58019 was deleted.

github-actions[bot] avatar Sep 18 '24 18:09 github-actions[bot]

I don't understand how this is supposed to be used based on the docs description.

From what I understand, this functionality allows defining feature-level permissions so that only specific users can modify certain sensitive features. Happy to collaborate on these docs but I'd like to sync and understand how this functionality actually works first.

rolodato avatar Sep 19 '24 16:09 rolodato

I don't understand how this is supposed to be used based on the docs description.

From what I understand, this functionality allows defining feature-level permissions so that only specific users can modify certain sensitive features. Happy to collaborate on these docs but I'd like to sync and understand how this functionality actually works first.

It's quite hard to describe but it does work as updated in the docs.

If permissions are tagged, the following permissions will only be granted on features with matching tags:

  • Create feature, Update Feature, Segment Overrides, and Change Requests

If a user has admin permissions from another role or group it'll grant the user the missing permissions.

kyle-ssg avatar Sep 24 '24 08:09 kyle-ssg

@gagantrivedi cc just to confirm, were the missing permissions added? This used to be just update feature and segment override

kyle-ssg avatar Sep 24 '24 08:09 kyle-ssg

@gagantrivedi cc just to confirm, were the missing permissions added? This used to be just update feature and segment override

No, they are not added yet

gagantrivedi avatar Sep 24 '24 08:09 gagantrivedi

Flagsmith feature linked: tag_based_permissions Default Values:

Environment Enabled Value Last Updated (UTC)
Production ❌ Disabled 2024-09-18 15:13:59
Staging ✅ Enabled 2024-09-18 15:18:34
Demo ❌ Disabled 2024-09-18 15:13:59
Self hosted defaults ❌ Disabled 2024-09-18 15:13:59

flagsmith[bot] avatar Oct 30 '24 19:10 flagsmith[bot]

Flagsmith Feature tag_based_permissions has been updated:

Segment flagsmith_team values:

Environment Enabled Value Last Updated (UTC)
Demo ✅ Enabled 2024-10-30 19:17:41

flagsmith[bot] avatar Oct 30 '24 19:10 flagsmith[bot]

Flagsmith Feature tag_based_permissions has been updated:

Segment flagsmith_team values:

Environment Enabled Value Last Updated (UTC)
Production ✅ Enabled 2024-10-30 19:20:04

flagsmith[bot] avatar Oct 30 '24 19:10 flagsmith[bot]

Flagsmith Feature tag_based_permissions has been updated:

Environment Enabled Value Last Updated (UTC)
Demo ✅ Enabled 2024-12-04 14:06:51

flagsmith[bot] avatar Dec 04 '24 14:12 flagsmith[bot]

Flagsmith Feature tag_based_permissions has been updated:

Environment Enabled Value Last Updated (UTC)
Production ✅ Enabled 2024-12-04 14:07:01

flagsmith[bot] avatar Dec 04 '24 14:12 flagsmith[bot]

Flagsmith Feature tag_based_permissions has been updated:

Segment qbiq values:

Environment Enabled Value Last Updated (UTC)
Production ✅ Enabled 2024-12-05 16:04:05

flagsmith[bot] avatar Dec 05 '24 16:12 flagsmith[bot]