web-monitoring-ui
web-monitoring-ui copied to clipboard
Hide/show UI elements based on permissions
This depends on actually having permissions implemented in the API (edgi-govdata-archiving/web-monitoring-db#34), so we can’t quite do this work yet.
Once the API returns permission information for a user, we should use that to limit/modify what we display:
-
A user might have all their basic view permissions revoked, in which case we should not request any data at all and display a message.
-
A user may not have permission to view annotations, in which case we should hide the annotation form/view (kind of like we do now when not logged in, but we should change the message)
-
A user may have permission to view annotations, but not make new ones, so we should have a view-only/disabled version of the annotation form.
Particular places in code recommended by mr0grog that would be related to this issue: https://github.com/edgi-govdata-archiving/web-monitoring-db/blob/master/app/controllers/users/sessions_controller.rb
https://github.com/edgi-govdata-archiving/web-monitoring-ui/blob/master/src/services/web-monitoring-db.js#L329
https://github.com/edgi-govdata-archiving/web-monitoring-ui/blob/master/src/services/web-monitoring-db.js#L132
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in seven days if no further activity occurs. If it should not be closed, please comment! Thank you for your contributions.
Still a thing that has to happen.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in seven days if no further activity occurs. If it should not be closed, please comment! Thank you for your contributions.
Added never-stale
label