-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fixed #720: Restricted button to remove scheduled status to admin users #721
Conversation
…tus to admin users
…s to admin users
@aaboffill I'm sorry, I forgot to tell you that we have been using "rules" for the permission control: see this change in PR #592. Code references: Apart from this, all seems good to me. Can you change ".is_staff" to "sous_chef.edit"? |
…dmin restrictions
@lingxiaoyang I added your suggestions using the defined rules. |
@@ -1449,8 +1450,10 @@ def get_success_url(self): | |||
) | |||
|
|||
|
|||
class ClientStatusSchedulerDeleteView(generic.DeleteView): | |||
class ClientStatusSchedulerDeleteView( | |||
PermissionRequiredMixin, generic.DeleteView): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lingxiaoyang This is an example of the ugly python code when we have 79 characters as the line limit. It's my opinion!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it may be unavoidable in some cases, even with a higher limit. But 79 is not enough for a Django application, for sure.
Fixes # by aaboffill
Changes proposed in this pull request:
Scheduled Status Change
to the admin users only.Status
How to verify this change
Schedule Status Change
won't be displayed.