DEV Community

Boots
Boots

Posted on

What would you name a read-only user role?

Assuming you implemented a role-based access control system, what would you name a "readonly" role?

Here are my proposals so far, preference-ordered:

* Observer
* Spectator
* Monitor
* Watcher
* Reporter
* Guest
* Rubbernecker
* Greg
* Wallflower
* Mall-Cop
* Tattle-Tale
* Sloth

Top comments (7)

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

I think the answer could vary between applications depending on exactly what the user is expected to be doing.

Are they signed in? If so, the Guest might not be appropriate (Possible exception for something like the hotel industry)

Is there a there a "themed" name you could give the role? (This is pretty specific, but still comes up).

Collapse
 
brettimus profile image
Boots

Yeah guest felt wrong but I couldn't put my finger on why! That's totally why

And yes yes yes context is always important -- I'm being purposefully vague here bc I wanna see where peoples' minds go 😊

Collapse
 
zspine profile image
M#3

Yes, I agree with Tyler, it depends on the application and role hierarchy.

For example:
Symfony uses the role 'anonymous' for not logged in users

Maybe 'viewer' or 'reader' :)

Collapse
 
dmfay profile image
Dian Fay

reader

Collapse
 
brettimus profile image
Boots

For the record, I'm partial to Greg

Collapse
 
ghost profile image
Ghost

ghost, sometimes is hard not to put awesome names in code and stick to clear descriptive names. It's a sad day when you have to chose a good name over an awesome one.

Collapse
 
brettimus profile image
Boots

That’s the spirit! I’ll pitch it 🀞🏼