M
M
maiden6662014-06-27 13:10:56
ASP.NET
maiden666, 2014-06-27 13:10:56

How to do separation of company permissions in ASP .NET MVC web application?

I am learning .NET MVC.
For example, I want to write a service in which various companies can register that have access to the functionality (let's say they store their documents).
Each company can have multiple users. Each company has its own path in the URL, for example mysite.com/rogakopita.
How to make sure that companies have access only to their documents? Those. if I'm from another company and typed mysite.com/rogaikopita/docs , then it's empty there, or I'm redirected to my company's website

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cyril, 2014-06-27
@maiden666

Of course:
- you have a database
- there are connections between users and companies in the database
Somehow in the controller or already in the action you get information about the presence / absence of these connections and, depending on this, decide what to return to the user.
And of course, you know about routing.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question