The following warnings occurred: | ||||||||||||
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
|
Ideas/Advice - Printable Version +- UserSpice (https://userspice.com/forums) +-- Forum: Support Center (https://userspice.com/forums/forumdisplay.php?fid=23) +--- Forum: UserSpice 4.3 and Below (https://userspice.com/forums/forumdisplay.php?fid=26) +--- Thread: Ideas/Advice (/showthread.php?tid=516) |
Ideas/Advice - muhammedc - 04-04-2017 Hi I wanted to rack your brain and see what your thought process would be as well as ideas on the following: 1) I want to create a table and page where a "company" and associated data can be created. Then I want to associate users to a specific company. What do you think would be the best approach? 2) I would like to then assign permissions based on a company but also have the flexibility to utilise user groups and associated permissions? Any suggestions, ideas, tips, pitfalls, tricks etc would be appreciated. Thanks -M Ideas/Advice - Brandin - 04-05-2017 If I am understanding correctly, each company has its own set of pages each user would access? Is that right? Have you thought about having a permission group for each company? If I am right, you could have a company table, match that to the permission ID, and match that to the user. It would obviously take more than just that, but that would be a start. The way I have my system setup is for one single "company" lets say, and each level has its own extra pages it has access to. So you could have a permission level for each company, and then make a code on the account.php or home.php page that redirects to a certain page based on company, and then you can use the companies to do up a nav. It won't be easy, but I can see it working. I hope this helps. Ideas/Advice - muhammedc - 04-10-2017 Hi, Thanks for your feedback above... much appreciated... So, Basically what I am looking to do is create a company, and then assign users to that company. The permission group at the moment work perfectly at user level, and I need to keep it that way due to user roles. So when I create a user, I dont want to everytime to manually add company name, company contact details etc... I just want to link it to a company already created. but the above being said, I would like the flexibility to be able to use the company in the permission groups as well instead of single users if need be in the future... Thanks Ideas/Advice - mudmin - 04-10-2017 The company and account owner fields are built into the users table, so you have that option too. You basically create one master account for each company and then when you have users for that company, you put master account's user id in the account_owner column of the user table. Ideas/Advice - Brandin - 04-10-2017 Wise of the company details, you can always create a table for each company, and then add a custom function for when assigning users to a copy/creating a user, that copies the information from the company details table to the user table to fill in the required fields. Ideas/Advice - mudmin - 04-11-2017 I have actually developed the idea of "sub users" for some of my other products. I need to push that code out to userspice as a whole. In the admin panel you can decide how many sub users each account_owner is allowed to have. |