The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (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
Ideas/Advice
#1
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
  Reply
#2
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.
  Reply
#3
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
  Reply
#4
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.
  Reply
#5
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.
  Reply
#6
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.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)