khanishfaq82 wrote:
Dear Ismail,
I got your point but then how will i maintain the permission level..
Whenever i create a new user i am planning something like putting a conbobox their and then putting the values like "Top Mngt","Middle Mgnt","Lower Mgnt" etc.
So if i select the user to be top Mgnt then he should be able to see all the reports or whatevert and if user is middle level then limited and like that..
Can u suggest me a way to do that..
Jazakallah Khairadvance
Easy :)
You need a user management or maintenance page. This way, even if you have promotions from one level to another (or demotions even), you can still maintain that information in the database.
Now, you can also use a numeric comparator to facilitate this implementation.
So, it would be like setting "Monthly cash flow report" to level 2. This would mean that anyone with a privilege of level 2 or greater has access to this page. This then simplifies the comparison after retrieving the data, you would do something as follows
if(user.Privilege >= privilege)
GiveAccess();
else
AccessDenied();
Where privilege is the variable that contains the returned privilege value from the database.
I hope that answers your question and if it does then please, mark this thread as answered.
If you have more questions, we'll be more than happy to help :)