Skip to content
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

REST API does not work for users with delegate role #207

Closed
holtgrewe opened this issue Aug 23, 2021 · 2 comments
Closed

REST API does not work for users with delegate role #207

holtgrewe opened this issue Aug 23, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@holtgrewe
Copy link
Collaborator

Describe the bug
Users with delegate role cannot use the upload REST API

To Reproduce

  • User has delegate role
  • User cannot upload files / access REST API

Expected behavior
User should be able to import cases via API

Screenshots
N/A

Additional context
N/A

@holtgrewe holtgrewe added the bug Something isn't working label Aug 23, 2021
@holtgrewe
Copy link
Collaborator Author

Root Cause Analysis

Permissions are not correctly checked in importer module.

rules.add_perm("importer.add_import", rules.is_superuser | pr_rules.is_project_contributor)
rules.add_perm("importer.delete_import", rules.is_superuser | pr_rules.is_project_contributor)
rules.add_perm("importer.update_import", rules.is_superuser | pr_rules.is_project_contributor)

Owner & delegate role missing here.

@holtgrewe holtgrewe added this to the v0.24 milestone Nov 22, 2021
@holtgrewe holtgrewe self-assigned this Nov 22, 2021
@holtgrewe
Copy link
Collaborator Author

Resolution Proposal

Simply add the missing roles here.

Resolution Proposal Summary

Affected Components
VarFish Server (only)

Affected Modules/Files
importer.rules

Required Architectural Changes
none

Resolution Sketch

  1. Add missing roles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants