creating admin users through page

28 views
Skip to first unread message

Sumegh P

unread,
Mar 27, 2017, 4:11:43 AM3/27/17
to structr
Is it possible to create the default user as an admin? I used a create form for creating user names and passwords and other entries. But confused with setting isAdmin field as True.
Thanks
-sumegh

Lukas Reich

unread,
Mar 27, 2017, 4:21:31 AM3/27/17
to structr
Hi, 
you could write an onCreate schema mehtod for the type user and set the isAdmin flag there. However, depending on the kind of your application I wouldn'd recommend doing this. As an admin user you have access to everything and can even revoke admin rights from others so this can be very dangerous.

Best regards, 
Lukas Reich

Sumegh P

unread,
Mar 27, 2017, 7:36:14 AM3/27/17
to structr
Yes, that is risky. But thats it I was looking for, for building server app n provide backend access to the users.
Thanks :)
-sumegh
Reply all
Reply to author
Forward
0 new messages