Skip to content

Bugfix/four 9664#5066

Merged
ryancooley merged 4 commits into
developfrom
bugfix/FOUR-9664
Aug 2, 2023
Merged

Bugfix/four 9664#5066
ryancooley merged 4 commits into
developfrom
bugfix/FOUR-9664

Conversation

@gustavobascope
Copy link
Copy Markdown
Contributor

Issue & Reproduction Steps

Request failed with status code 403" Error when delete files

Solution

Added a policy for request if a user participate

How to Test

Create a process
Add a screen with file upload
Complete task A with the admin user
Send the request to task B
Complete task B with the user without permissions
Upload files with the user without permissions
Try to delete the file uploaded

Related Tickets & Packages

https://processmaker.atlassian.net/browse/FOUR-9664

Comment thread ProcessMaker/Policies/MediaPolicy.php Outdated
}

if($user->can('participate', $media->model)) {
return $user->can('participate', $media->model);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@gustavobascope For this and the one above it, inside the conditional you can return true; instead of running the permission check again

Merge branch 'develop' into bugfix/FOUR-9664
@ryancooley ryancooley merged commit b889a4b into develop Aug 2, 2023
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.

4 participants