web-monitoring-ui icon indicating copy to clipboard operation
web-monitoring-ui copied to clipboard

Hide/show UI elements based on permissions

Open Mr0grog opened this issue 7 years ago • 5 comments

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.

Mr0grog avatar Sep 15 '17 21:09 Mr0grog

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

lightandluck avatar Sep 18 '17 00:09 lightandluck

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.

stale[bot] avatar Jan 10 '19 00:01 stale[bot]

Still a thing that has to happen.

Mr0grog avatar Jan 10 '19 05:01 Mr0grog

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.

stale[bot] avatar Jul 09 '19 05:07 stale[bot]

Added never-stale label

lightandluck avatar Jul 09 '19 22:07 lightandluck