Skip to content

fix(permissions): v0.5.2 — idempotent preset loading and authorization - #34

Merged
edimedia merged 1 commit into
mainfrom
develop
Aug 3, 2026
Merged

fix(permissions): v0.5.2 — idempotent preset loading and authorization#34
edimedia merged 1 commit into
mainfrom
develop

Conversation

@edimedia

Copy link
Copy Markdown
Member

load_preset() — made idempotent (sync mode):

  • Roles/groups/role_grants are diffed against the DB and updated when their configuration changed, created when new, never deleted
  • Stats now report created/updated per entity type
  • Removed the --force guard (function is safe to re-run anytime)

Group.save() — fixed slug corruption:

  • No longer overwrites an explicitly provided slug with slugify(name)
  • Was causing duplicate key errors on preset re-loads because the stored slug differed from the preset's lookup key

grant_manager_access_to_owners() — made idempotent and exhaustive:

  • Now grants ALL configured role grants (all scopes), not just the access manager scope
  • Uses assign_role() which already performs upserts internally

load_preset() — made idempotent (sync mode):
- Roles/groups/role_grants are diffed against the DB and updated when
  their configuration changed, created when new, never deleted
- Stats now report created/updated per entity type
- Removed the --force guard (function is safe to re-run anytime)

Group.save() — fixed slug corruption:
- No longer overwrites an explicitly provided slug with slugify(name)
- Was causing duplicate key errors on preset re-loads because the
  stored slug differed from the preset's lookup key

grant_manager_access_to_owners() — made idempotent and exhaustive:
- Now grants ALL configured role grants (all scopes), not just the
  access manager scope
- Uses assign_role() which already performs upserts internally

Currency: added CDF (Congolese Franc)
@edimedia
edimedia merged commit 6e5b0ca into main Aug 3, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant