Default role for the registered user in Turnkey

CapableObjects Forums SupportForum Default role for the registered user in Turnkey

This topic contains 2 replies, has 2 voices, and was last updated by  guest00 6 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #4899 Score: 0

    guest00
    Participant

    Hi,
    stupid question – I have default role in the SysRole table and I want to assign this defauls role to the registered user, i.e. is it possible to “inject” Register/LogIn functionality? Or there is an easy way to do this?
    Thank you!
    P.S. I’m able to manually assign roles via viewmodel, but it requires manual things

    #4909 Score: 0

    Admin
    Keymaster

    Hi
    There is no method called on successful user login / although I think it would be a good idea to add one. If the SysUser class has a method AfterSuccessfulLogin we could call it. But that does not exist today.
    Maybe you can suffice with OnCreate method on SysUser – here you could create your default role?

    But remember to mark the OnCreate as override and call self.base.OnCreate so you do not stop superclass OnCreate: //www.capableobjects.com/2012/06/07/calling-base-class/

    #4910 Score: 0

    guest00
    Participant

    Hi,

    Completely forgot abot OnCreate/OnUpdate methods!
    App is ok now.

    Thank you for help!

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Comments are closed.