yeti68
unread,Mar 1, 2011, 2:32:42 PM3/1/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-auth-ldap
Hi,
i'm trying to use other groups than active, staff and superuser and am
not very successfull 8-(
In my settings - file i have this line:
AUTH_LDAP_USER_FLAGS_BY_GROUP = {
"is_shop": "cn=Shop,ou=groups,dc=gea,dc=at"
}
the binding seems to work, i#m getting this messages in my log:
search_s('ou=people,dc=gea,dc=at', 2, 'uid=ldaptest') returned 1
objects: uid=ldaptest,ou=people,dc=gea,dc=at
Populating Django user ldaptest
uid=ldaptest,ou=people,dc=gea,dc=at is a member of
cn=Shop,ou=groups,dc=gea,dc=at
as you can see my group is called Shop.
I did change the model of auth_user and the table auth_user in the
database. they look like this:
model:
class AuthUser(models.Model):
id = models.IntegerField(primary_key=True)
username = models.CharField(unique=True, max_length=30)
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
email = models.CharField(max_length=75)
password = models.CharField(max_length=128)
is_staff = models.BooleanField()
is_active = models.BooleanField()
is_superuser = models.BooleanField()
last_login = models.DateTimeField()
date_joined = models.DateTimeField()
is_shop = models.BooleanField()
class Meta:
db_table = u'auth_user'
Table:
CREATE TABLE auth_user
(
id serial NOT NULL,
username character varying(30) NOT NULL,
first_name character varying(30) NOT NULL,
last_name character varying(30) NOT NULL,
email character varying(75) NOT NULL,
"password" character varying(128) NOT NULL,
is_staff boolean NOT NULL,
is_active boolean NOT NULL,
is_superuser boolean NOT NULL,
last_login timestamp with time zone NOT NULL,
date_joined timestamp with time zone NOT NULL,
is_shop boolean NOT NULL DEFAULT false,
CONSTRAINT auth_user_pkey PRIMARY KEY (id),
CONSTRAINT auth_user_username_key UNIQUE (username)
)
WITH (
OIDS=FALSE
);
ALTER TABLE auth_user OWNER TO postgres;
Maybe i don't grasp the intention of the group-mapping, what's wrong?
thanks
werner