Skip to content

Conversation

mohamedelabbas1996
Copy link
Contributor

@mohamedelabbas1996 mohamedelabbas1996 commented Oct 17, 2025

Summary

This update extends the permissions framework to handle both model-level and object-level permissions.
If a model has no related project or is linked to multiple projects, the framework now falls back to Django’s model-level permission checks.
This enables features like granting all authenticated users the ability to create projects while keeping project-based access unchanged.

List of Changes

TBD

Related Issues

#1006

Detailed Description

TBD

How to Test the Changes

TBD

Screenshots

TBD

Deployment Notes

TBD

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 Oct 17, 2025

Deploy Preview for antenna-preview canceled.

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

@mohamedelabbas1996 mohamedelabbas1996 changed the title Extend permission framework to support model-level permissions Extend permissions framework to support model-level permissions Oct 17, 2025
@mohamedelabbas1996 mohamedelabbas1996 self-assigned this Oct 17, 2025
@mohamedelabbas1996 mohamedelabbas1996 linked an issue Oct 17, 2025 that may be closed by this pull request
class Meta:
ordering = ["-priority", "created_at"]
permissions = [
# Project permissions
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can this be moved to base.models.BaseModel.Meta?

You have to explicitly inherit from the class Meta(BaseModel.Meta)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Adding create_project here makes sense for the Project model! but for other models, they could either go on that model or the BaseModel with a dynamic method.

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.

Enable all users to create projects

2 participants