Menu

Type of users

While building the first constructor/views I realized that never defined (yet) what kind of users we are going to have in our app. What fields each type will see? Who is going to see other users records? Who will be able to see deleted records?

I evaluated a couple of options, like having per user defined some boolean values (checkboxes) enabling/disabling certain features (like seeing deleted records). That could work, but it's not a flexible approach. Whenever there's a new need or feature that we want to assign to some users, a new boolean field has to be created for users .

Regarding which field a type of user should see (more detail, audit fields, etc.), I recalled the Siebel/Salesforce approach to have page layouts, and then assign an entity page layout to a user profile. But that's for a super scalable a generic app. Requires a lot of effort in coding and configuration.

After a couple of hours thinking about this subject and all the aspects it could impact, I finally remembered... this is a GSM (garden seed management). It is small and simple. I have to take advantage of that fact. So keeping it simple, app should have only two types of users: Regular and Admin. They will be diferentiated by a boolean in the user records (is admin?).
In each controller, we'll evaluate if the user is an admin (stored in session, server-side), and then showing 'extra' operations (like undelete records) and showing audit records. Only two flavors is enough in this case :)

Posted by augusto wloch 2020-04-10 Labels: design

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.