Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix unpriviledged users being able to access bulk process#6290

Closed
f-osorio wants to merge 3 commits into
ckan:masterfrom
f-osorio:prevent-unauth-user-accessing-bulk-process
Closed

Fix unpriviledged users being able to access bulk process#6290
f-osorio wants to merge 3 commits into
ckan:masterfrom
f-osorio:prevent-unauth-user-accessing-bulk-process

Conversation

@f-osorio
Copy link
Copy Markdown

Any user was able to access and view the bulk process page for organization
management. This fix checks access and returns unauthorized exception
if theuser shouldn't be there.

Fixes #

Proposed fixes:

Added check_access for group update and a catch statement for NotAuthorized

Any user was able to access and view the bulk process page for organization
management. This fix checks access and returns unauthorized exception
if theuser shouldn't be there.
@smotornyuk
Copy link
Copy Markdown
Member

I see that the post-handler of the same view uses the bulk_update_public auth function. Can you do the same in the get-handler? Or even extract this auth-check and put it into the _prepare method.

@smotornyuk smotornyuk self-assigned this Jul 29, 2021
Previously implementation only worked for GET requests, now works with
GET and POST requests
@f-osorio
Copy link
Copy Markdown
Author

I see that the post-handler of the same view uses the bulk_update_public auth function. Can you do the same in the get-handler? Or even extract this auth-check and put it into the _prepare method.

Right, I'll get that in soon.

Was using group_update. Also removed duplicate check from POST request
@smotornyuk
Copy link
Copy Markdown
Member

As we need it for backport, i've fixed tests in a new PR #6346

@smotornyuk smotornyuk closed this Aug 27, 2021
smotornyuk added a commit that referenced this pull request Aug 30, 2021
…accessing-bulk-process

[#6290] prevent unauth user accessing bulk process [test fix]
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.

3 participants