Users and Roles

Posted by Community Admin on 03-Aug-2018 21:54

Users and Roles

All Replies

Posted by Community Admin on 03-Nov-2010 00:00

Hi


I have just started using the Sitefinity 4.0 beta, in fact, the CMS itself. I have several questions. Would someone answer them please?

1. A super-admin (First user of the web site) creates the company-admin users which in turn should be able to create the users for their respective companies. I created a role and assigned a backend permission to it: Manage Users. And, then assigned that role to a company-admin user. But when that company-admin user logs in, there is no link to the Users area.

Where am I wrong, do I need to do some programming (Sitefinity API) too?

2. A company-admin user shall be able to see his own User record in the Manage User but not the  super-admin User record. And, also he shall not be shown the User records of the other companies. He shall have access to, view, and manage his company-users only. How can this be implemented? It seems that I need to use some sort of filter using the SF API. The bottom line is the other users of the system shall be able to perform the backend functionality partially depending on the power we give to them?

3. I want to customize the User page i.e I want to add some more fields to the existing, default User page. How can this be done? Do I need to create the Users module or is there a way to extend the existing functionality with minimal effort? Perhaps, the efficient way is to do it using the Design tool. There must be some way but I am not sure, may be using Duplicate Page and then edit the copy.. I am not sure..

4. It looks like the SF stores the pages, user controls, etc. in the Sitefinity.mdf db file. am I correct? If yes, is there a way to import them outside of the database and keep the aspx, ascx files outside just like the VS SDK handles it? I may not be correct but this is what I perceived. I have not taken a look at the documentation yet. If I am correct, why SF opts to lock all of its content in the db.

5. The Users and Roles are stored in the same SF.mdf file. Correct? Now I am supposed to create a Company table and a lots of other tables and would like to keep them in a separate database, let's say, My.db file. Now the issue is that the Users and Roles etc. are in one db whereas the other data in another db. How to keep all in one single database?

6. Can we add the "external" aspx pages to Sitefinity? If yes, can we apply the SF built-in functionality to these external pages? For instance, can we apply the "Page Permissions" to them? I am planning to create the aspx pages and ascx user controls in the VS and then add them to the SF. What will be the limitation to such pages?

7. SF provides the "Edit in VS" link? In what instances, shall we use the VS? For example, SF SDK has a built-in "Create Page". Then how VS can complement the SF SDK?

I am looking forward the SF experts to answer them.

Thanks
Raman

Posted by Community Admin on 08-Nov-2010 00:00

Hi Raman,

Thank you for using our services.

1) The issue you are experiencing is because the role to which you gave permissions to manage users does not have permission to view the page which allows you to manage users. You have to go to Administration -> Backend Pages and provide view permissions for the role you wish to manage users.

2) A user can either manage his own profile (link in the top right corner when you are in the back-end) or can manage other users. So if the user does not have permissions to manage users than the user should be able to only manage his own profile. The other requirement of company users being able to only manage users from a given set you can achieve by creating multiple providers for users. You should go to Administration -> Settings -> Security -> Membership Providers and add another provider which uses the same configuration as the default one just with different name and application name. Then you will be able to separate users from different companies into different providers and allow them to manage their own resources.

3) This functionality is not yet available. In the beta version of Sitefinity extension of the user profile is not implemented. We will have this functionality in our future releases.

4) All Sitefinity content is stored in database. We do not keep physical content except from configuration files and search indexes. There is no option to make Sitefinity create physical files for pages. This would be even impossible in a shared hosting environment as the environment does not allow you to use File I/O.

5) All content from Sitefinity is generally stored in one database. This includes Users, Roles, and user profiles. Our tables are automatically created by the ORM tool which we use. There will be no problem if you create your own tables in the database. This is done in the same way you would do it in a regular ASP.NET website. Please note that the database your website uses depends on your selection when you instantiate the project. The connection string is stored in ~/App_Data/Sitefinity/Configuration/DataConfig.xml.

6) External pages for Sitefinity are on the plan however currently you can only use Sitefinity Pages. When we have external pages functionality you will be able to apply page permissions on them. You can currently work with ASCX control by adding them to your Sitefinity Toolbox. You can check out this topic in our Developer Guide: Adding a new control.

7) The Edit in VS option is used to open your project in VS so that you can extend it by creating custom controls and functionality. We support only Visual Studion 2010.

Regards,
Radoslav Georgiev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Nov-2010 00:00

Hi Sitefinity

Thx. for the reply. I need a clarification on the membership provider.

>Then you will be able to separate users from different companies into different providers and allow them to manage their own resources.
Let's say I have 5 users and 2 membership providers (representing 2 companies). I want to attach the 3 users to one membership provider and the rest 2 users to the other membership provider. Is it possible to do this at design time using the SF's GUI? Now when a user U1 belonging to a particular membership provider (company) logs in, he should be able to manage his resources automatically. For instance, whatever new users he create, they will be given the same membership provider as that of the user U1 automatically. When the user U1 looks at the list of the Purchase Orders, he should be shown those POs only that are created by the users of their membership provider.

This means that I don't want users to specify the membership provider (company) they belong to at the time of login. In other words, I don't want to associate a membership provider to the login control. I believe this is possible because we have already associated the users to the membership providers at design time (if SF allows it to do so, I have not found the correct place in the GUI yet)

Thanking you in anticipation
Raman

Posted by Community Admin on 17-Nov-2010 00:00

Hello Raman,

Let's say I have 5 users and 2 membership providers (representing 2 companies). I want to attach the 3 users to one membership provider and the rest 2 users to the other membership provider. Is it possible to do this at design time using the SF's GUI?

If you have two providers you should implement methods for creating user like

CreateUser(string username, string password, string email, string passwordQuestion, string passwordAnswer, bool isApproved, object providerUserKey, out System.Web.Security.MembershipCreateStatus status)

Then using the UI you can create users in each provider without problems. You can create a custom policy as described in this post.

Greetings,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 19-Nov-2010 00:00

Hi


Thx. for the reply.

How efficient is it to create, let's say, 200 membership providers,in terms of performance. If we opt to go with this, i hope that when a user belonging to a particular company (membership provider) wishes to view only those POs that belong to the users of this membership provider automatically. I mean to say that we don't have to do any programming in order to filter out the data.

Secondly, you said we cannot add the customized properties to the Login and Register modules. But there must be some way to do so, for instance, extending the SF classes. This is very much required.

If not, can we write out own provider or buy the third-party provider that does this Login and Register according to our needs.

I am looking forward to hear from you

With Regards
Raman

Posted by Community Admin on 22-Nov-2010 00:00

Hello Raman,

I do not see any value of having 200 membership providers, since you could have 200 or more roles in a single provider. You can use Active Directory to filter users from a given unit or organization or implement a custom Membership Provider with methods that will allow you to filter the users as you want.

If you create Sitefinity based membership provider you will be able to use the built-in login control. To register a user you can use the standard ASP.NET CreateUserWizard control and customize it depending on your needs.

Sincerely yours,
Ivan Dimitrov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed