I created a simple car rental in D365FO with 3 tables Cars ,Customers, Rentals and I'm working on security I give them Privileges and duties and roles and I want to ad XDS to them i don't know how to do it
I didn't find how to do it every solution gives me error
Related
I am working on a system build in ruby on rails. We using rails admin to display all data.
We will have 3 different types of clients, Client1 (carshop), client2 (Headquarters with many carshop, like fransice) client3 (Subcontractors)
Client 1, and client2 is basicly same type of client, but but client2 have a headquarter, and many carshops below as a chain.
The headquarter should be able to view all data from all the carshop that belong to headquarter, create user logins for each shops, but all shops is independent from 1 shop to another (The shops that belongs to the headquarters cant see each other data, like order historic)
Hope my question make sense to you.
Thank you in advange.
trying to create a user that have permission to create sub users that belongs to the users admin panel, but only can see data that the user have given permission to.
When registering to my website, users have to specify which company or group they are working for and then all the users are placed in one db table called users. I was wondering if it's possible to create a new table for every single company that registers and then put all users from that company to that one specific table while still having a single user model and a single controller.
I think you need multi-tenant application.
Here Each company/group can act as a tenant - all users are members of the tenant.
A simple library for this purpose is Milia
Please check the documentation and use accordingly.
It will save all companies users to the same table - But while retrieving apply the scope to find users of a particular tenant.
You don't need to create a table for each company. You need to create tables called Companies and Users that are in relation with each other. So User belongs_to company. Then when you are creating a user you pass company_id to that user. You can read more about it here: http://guides.rubyonrails.org/association_basics.html
I know a lot of startups and tech companies essentially allow you to register, and you end up registering a company and your user.
An example would be basecamp for example. I'd like to achieve the same thing, however I'm not quite certain on how they do it, and what the best way to do it is.
My thought is to have a user and company model, where on registration you register a company, and it accepts nested attributes for user. As in my head at least the relation is:
User belongs_to :company
Company has_many :users
and the registration is a Company#new with a company.user.build.
However for some reason this does feel a bit strange, as to me it would make more sense that you register a user, and create the company it belongs to.
I just want to lay the foundation right, so I don't start building anything massive on top of a system that isn't good.
More info:
The purpose is to make the person that registers itself and the company an admin, and only allow new users to be a part of a company by being invited by an admin. Everything that goes on within the project is company based only for those within the company. You can also group users that belongs to the company, and create segments or say departments of the company. Beside that the company has no function other that being the connector between all the users that belong to the same company.
Currently I am workin on a rails app which has users and projects. Each user has a role of admin from the start, so they have full access on their projects. But a user1 can be assigned to other projects created by user2, so that means the user2 will select one users1, it will give him the role of moderator, on projectA.
I was thinking in creating a link table between user role and project, is this the best approach?
Thank you.
No i think you should model usergroups and assign new users to the adminGroup. Then you create the moderatorsGroup and add the user1 to the project as member of this group. So you have a matrix. Usersname | Project1 groups | Project2 groups.
This way you can have several roles in mutliple projects. Then you just have to keep the groups project specific.
The problem: client needs a website to serve 10+ customers, each customer has 5-10 people they wish to grant access using login & user name, once "logged in" the user can download files specific to their company.
The files will be uploaded to a directory under the customer name, and displayed as a list. Currently using membership for all of the users, it's just the "by customer" segmentation I'm wondering about. the question being under ASP.NET MVC what is the cleanest or simplest approach to solving the customer segmentation, trying to avoid customer membership provider so was going to use the roles to assign customer group.
Thoughts appreciated.
In the past I tried to avoid the membership and role providers as well since I don't like the way they are implemented. So just use the old school way. Create two tables on your db, one stores the customers the other the users.
Just build a simple relationship like: User n ----- 1 Customer
Now if a user logs in first authenticate him/her against the User table, then authorize on the Customer table.
The provide the right downloads, just create an additional table File, which has a n:1 relationship to the Customer table (like the User table).