cgwire / kitsu

Collaboration Platform for Animation and VFX Productions
https://kitsu.cg-wire.com
GNU Affero General Public License v3.0
367 stars 102 forks source link

regression: Kitsu user (artist role) can no longer pin a task comment #1391

Closed jason-mightynice closed 3 months ago

jason-mightynice commented 3 months ago

Context

Studio name: Mighty Nice Kitsu version: 0.19.13 Production type:

Describe the bug

After we upgraded to 0.19.13, a user (artist role) cannot pin a comment on a task (they are the assignee). If they pin a comment, it is allowed and shows as pinned. However, it is not persistent. If he reloads the page, the comment is no longer pinned. He was able to do this before the upgrade. The super admin user could pin comments as expected.

Stack Trace

[2024-03-25 11:00:10,091] ERROR in init: Traceback (most recent call last): File "/opt/zou/zouenv/lib/python3.8/site-packages/flask/app.py", line 870, in fulldispatchrequest rv = self.dispatchrequest() File "/opt/zou/zouenv/lib/python3.8/site-packages/flask/app.py", line 855, in dispatchrequest return self.ensure_sync(self.view_functions[rule.endpoint])(*view_args) # type: ignore[no-any-return] File "/opt/zou/zouenv/lib/python3.8/site-packages/flask_restful/__init.py", line 489, in wrapper resp = resource(args, kwargs) File "/opt/zou/zouenv/lib/python3.8/site-packages/flask/views.py", line 110, in view return current_app.ensure_sync(self.dispatch_request)(kwargs) # type: ignore[no-any-return] File "/opt/zou/zouenv/lib/python3.8/site-packages/flask_restful/__init.py", line 604, in dispatch_request resp = meth(args, kwargs) File "/opt/zou/zouenv/lib/python3.8/site-packages/flask_jwt_extended/view_decorators.py", line 170, in decorator return current_app.ensure_sync(fn)(args, kwargs) File "/opt/zou/zouenv/lib/python3.8/site-packages/zou/app/blueprints/crud/base.py", line 406, in put self.check_update_permissions(instance_dict, data) File "/opt/zou/zouenv/lib/python3.8/site-packages/zou/app/blueprints/crud/comments.py", line 112, in check_update_permissions user_service.check_task_status_access(data["task_status_id"]) KeyError: 'task_status_id'

Desktop (please complete the following information):

EvanBldy commented 3 months ago

Hi @jason-mightynice, I will try to fix that for the next release. Thanks for the report :)

EvanBldy commented 3 months ago

Hi @jason-mightynice, We choose to not support this functionality: only admin, manager (in the team of the production) and supervisor (in the team of the production and in the department of the task).