The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
User page with selected links
#1
Hello,
in every page there is a selection to check if the user is logged in and has the proper credential to view this page, and open this page, or redirect to the login.
I need to build a site for a lot of users with different roles in the group.
Let me try to explain. In this site that has different departments with different roles. So the in every group there is a role "view" page, "edit" parameter setting. This for every department.
Could if the user is redirected to a new page after log in, where depending of the department and the role the links and pages that are viewable have a visible link. Now the user gets frustrated that the link is shown and after click the link views the login, in circular and after the login show the link again.
Users can be members from different departments.
Second issue, could a new used select the departments at sign in. \Where the admin can select the groups, where admin can give this user the different groups.
Maybe not an easy issue.
Thanks for the support.
  Reply
#2
Not sure I'm following your second question. I might need a little more info there.

Let me make sure I'm following your first issue...

In the event that a user is logged an and does not have permission to view a certain page, you want them to redirect to different pages based on what department they're in? Or are you looking for them all to go to different places after they're logged in? So department one would go to this page and department 2 would go to that page?
  Reply
#3
For the second item, we have a department "Sales" "Quality" "Inspection" "Warehouse".
All these departments have managers, that can change item-data (prices of activities) and users of the departments that can view item info.
So is a user of sales loges in, he is redirected to the sales page.
If a sales-manager loges in he is redirected to the same page and has more links, the one where he can change the price of the activities. The normal sales user can not use the link due to the defined roles, why show them than the link.

  Reply
#4
Ok. So I've been thinking about your problem.

There are a few things to think about. If a person, is going to have access to more than one department, then you need to go into the users table and create a column called "department" and give it 1 for sales, 2 for quality, etc.

Otherwise if someone is only in one department, you can use the id of that permission level (which can be found when you click on the permission in the admin panel. 1 is user, 2 is admin by default, so I'm going to assume 3 is sales, etc. So...what you want to do is go to usersc/scripts/custom_login_script.php and edit it. It should look something like this...
http://pastebin.com/eapf3jFD

I hope that helps. Let me know if you need further explanation.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)