I've set up Umbraco to use our School's Active Directory. It seems to work OK, but I can see a problem if everyone in the directory can log in and they are assigned a default role of "Writer".
My thought was to set up a user type of "No Permissions" and let that be the default type.
I can't find where to change the default type, other than a workaround by making "No Permissions" the record in the db with id=2.
Any suggestions on where to change this? Or any way to limit the users to those in a group of the AD?
Maybe you can use an Event that set the usertype when the user is Created. Here you'll find a page with all events. Here you can find some basic info how to wire up events and what references you should have.
Below you find an Example how to set the default Usertype.
using
System;
using
System.Collections.Generic;
using
System.Text;
using
umbraco.BusinessLogic;
namespace
UserTest
{
publicclassCreateUserHandler :ApplicationBase
{
public CreateUserHandler()
{
User.New += newUser.NewEventHandler(User_New);
}
void User_New(User sender, EventArgs e)
{
//Get the usertype by Id you could also iterate over UserType.getAll
UserType type = UserType.GetUserType(4); //Translator
changing default user type v4
I've set up Umbraco to use our School's Active Directory. It seems to work OK, but I can see a problem if everyone in the directory can log in and they are assigned a default role of "Writer".
My thought was to set up a user type of "No Permissions" and let that be the default type.
I can't find where to change the default type, other than a workaround by making "No Permissions" the record in the db with id=2.
Any suggestions on where to change this? Or any way to limit the users to those in a group of the AD?
I used the directions here
http://our.umbraco.org/wiki/how-tos/membership-providers/active-directory-membership-provider
and found them very helpful, but somewhat hard to find. Hopefully having another link to it will help someone else find it faster!
Maybe you can use an Event that set the usertype when the user is Created. Here you'll find a page with all events. Here you can find some basic info how to wire up events and what references you should have.
Below you find an Example how to set the default Usertype.
Hope this helps you,
Richard
is working on a reply...