Pergunta

How do I use an existing database to implement RBAC in XAF Security System?

I have added the Security Strategey Complex and Authentication Standard controls in the WinApplication.cs as the XAF tutorial told.

And my database has serval tables , a SysUser table which is equal to the user , a SysActor table which is equal to the role , and a SysActorRight table which is using describe the relationship between SysUser and SysActor.

And I have used the Persistent Classes Wizard to generate XPO and make it inherited from SecuritySystemUser and SecuritySystemRoleBase.

But I couldn't set the Security Complex component's UserType and RoleType properties to my own types. So what should I do ?

Thanks a lot for you reading my poor written-english.

Foi útil?

Solução

Are you sure you are using SecurityStrategyComplex instead of SecurityComplex? Are you sure SysUser implements IUserWithRoles and SysActor implements IRole?

There is a sample project showing a full implementation here.

For all DevExpress related questions, the first place to ask is the Support Center.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top