Skip to content

Conversation

@mohamedelabbas1996
Copy link
Contributor

@mohamedelabbas1996 mohamedelabbas1996 commented Aug 28, 2025

Summary

Add missing custom permissions for project managers to run test storage and sync deployment actions.

List of Changes

  • Updated ami/main/models.py to include missing custom permissions.
  • Updated ami/users/roles.py to grant project managers access to these actions.
  • Added new migration file 0070_alter_project_options.py.

Related Issues

Closes #931

Detailed Description

In PR #891, certain custom permissions were not included for project managers. As a result, users with the project manager role were denied access when attempting to run sync deployment or test storage. This PR resolves the issue by adding the missing custom permissions for sync and test actions to project managers, ensuring they can perform these actions as expected.

How to Test the Changes

  1. Log in as a project manager.
  2. Verify that the test storage action can be executed without a 403 Forbidden error.
  3. Verify that the sync deployment action can be executed successfully.
  4. Confirm no regressions for other roles or actions.

Screenshots

N/A

Deployment Notes

The new permissions will be automatically added to existing users with the Project Manager role after the migrations are run by the "Create roles" function that is triggered by the post-migration signal.

Checklist

  • I have tested these changes appropriately.
  • I have added and/or modified relevant tests.
  • I updated relevant documentation or comments.
  • I have verified that this PR follows the project's coding standards.
  • Any dependent changes have already been merged to main.

@netlify
Copy link

netlify bot commented Aug 28, 2025

Deploy Preview for antenna-preview canceled.

Name Link
🔨 Latest commit b8575ea
🔍 Latest deploy log https://app.netlify.com/projects/antenna-preview/deploys/68b8a45749ee890008b42cd1

@mohamedelabbas1996 mohamedelabbas1996 self-assigned this Aug 28, 2025
@annavik annavik self-requested a review September 3, 2025 09:55
@annavik annavik marked this pull request as ready for review September 3, 2025 09:55
Copy link
Member

@annavik annavik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mohamedelabbas1996!

I tested the changes as a project manager (not an admin). It worked well for me!

  • Before the updates I could not test the storage connection or sync captures ❌
  • After the changes I could both test the storage and connection and sync captures ✅

I suggest we merge and deploy this to unblock users and create follow up tickets for other improvements related to this.

@annavik annavik requested a review from mihow September 3, 2025 09:58
@mihow mihow merged commit 8601f95 into main Sep 3, 2025
6 checks passed
@mihow mihow deleted the fix/missing-custom-permission branch September 3, 2025 20:30
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.

Project managers cannot test storage or sync deployment

4 participants