FlowFuse / FlowFuse/flowfuse

Device editor access by viewer not working

Open
#3,476 0 comments 0 reactions 0 assignees View on GitHub
area:frontend needs-triage size:XS type:bug
Dominant language
JavaScript
Stars
400
Forks
89
Avg merge
1d 20h
Merged PRs (30d)
149

Description

### Current Behavior

In my dev env, viewer role user cannot access the device editor:

![msedge_SkMmSt3qix](https://github.com/FlowFuse/flowfuse/assets/44235289/20fd643b-eb50-489c-9d91-f7bf8d08bab6)

Additionally, when a viewer attempts to enable or disable developer mode, they are rightly inhibited however the toast message is undesirable

![msedge_t8I83XdPtX](https://github.com/FlowFuse/flowfuse/assets/44235289/de0c6f84-293a-45a9-8e20-0d17b88d919d)

### Expected Behavior

The Viewer should be treated the same as for Instances (i.e. view flows access)

The toast should be more user centric. It may be desirable to in fact remove the try/catch/alert code underneath the dev mode toggle and permit the error to be caught and shown by the apps default handler.

### Steps To Reproduce

create a viewer user and attempt to access device editor of an app assigned device

### Environment

- FlowFuse version: 2.1-git
- Node.js version:
- npm version:
- Platform/OS:
- Browser:

### Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate
```[tasklist]
### Tasks
- [ ] Allow viewer view access to a device
- [ ] https://github.com/FlowFuse/flowfuse/issues/4468
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.