Best methods for retrofitting?

B

Brett

I have an application with two user roles - regular or admin. If an admin
logs in, a button to the admin reporting section appears. This keeps
maintenance simple. However, I need to add more roles and restricted areas
to the app. For example, one account will have an admin and several regular
logins. The Admin can designate what each login will see within the
application. Now, there can be a Super Admin for that same account, which
is above the Admin. The Admins become departmental admins and administer
users for their department while the super admin administers for the entire
company. The tree looks like this:

- SuperX Admin --application developer (non client)
- Super Admin --client admin for a company
- Admin --client admin for department within company
- User --client account for employee within company (most basic and
restricted type)

To make all of this work, I'll need to retrofit the app with many
conditionals. One example is and area in the app where a couple of buttons
are displayed depending on the user role:

If login.type = SuperXAdmin Then
--show two buttons
Else if login.type = Admin Then
-- show one button visible for Admin
Else if login.type = user Then
-- most restricted login. Don't show any buttons
End If

The above is a case where "user" doesn't see any buttons but some of the
Admin roles do. There are many permutations to this through out the app
however depending on where some one goes, which is dependent on their role.
In some places, all role types may see the a button and in others only the
SuperXAdmin and SuperAdmin see the button. Whether the app is retrofitted
or designed from the start with the above conditionals, it will be a large
maintenance issue if I every need to add a new role.

What is the best approach to the above? References are appreciated.

Thanks,
Brett
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top