savoirfairelinux / sous-chef

Sous-Chef is a web application to help organizations to plan and deliver meals, and to manage clients files.
GNU Affero General Public License v3.0
67 stars 45 forks source link

Fixed #720: Restricted button to remove scheduled status to admin users #721

Closed aaboffill closed 7 years ago

aaboffill commented 7 years ago

Fixes # by aaboffill

Changes proposed in this pull request:

Status

How to verify this change

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 94.846% when pulling fb087490b13fba70cf7d83180aa43b83c82cda75 on aaboffill:dev_720 into 2075ffb6e8ee645752dd2d0b089fabe5273a45fd on savoirfairelinux:dev.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.09%) to 94.934% when pulling 61ed13c8c6af55e7d3838e9bdbec940df0a1126c on aaboffill:dev_720 into 2075ffb6e8ee645752dd2d0b089fabe5273a45fd on savoirfairelinux:dev.

lingxiaoyang commented 7 years ago

@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: https://github.com/savoirfairelinux/sous-chef/blob/dev/src/sous_chef/rules.py In template: https://github.com/savoirfairelinux/sous-chef/blob/dev/src/member/templates/client/list.html#L15 In view function: https://github.com/savoirfairelinux/sous-chef/blob/dev/src/member/views.py#L51

Apart from this, all seems good to me. Can you change ".is_staff" to "sous_chef.edit"?

aaboffill commented 7 years ago

@lingxiaoyang I added your suggestions using the defined rules.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.01%) to 94.86% when pulling 3aed260bb98353eeb69d58b8f31fbcccd3ae06aa on aaboffill:dev_720 into 2075ffb6e8ee645752dd2d0b089fabe5273a45fd on savoirfairelinux:dev.

lingxiaoyang commented 7 years ago

Verified: image vs image