c# - Handle Entitlement on Prism Modules -
we developing our application in wpf,prism & c# , using mvvm pattern
i developing entitlement part have decided entitlement should on screen level[this final , cant change this].
we have 3 modules, admin,transactions,reports
below screen names modulewise:-
admin - dropdown maintenance,user maintenance etc. transactions - products,orders etc. reports - products reports,order reports etc. we have more 50 screens in our application
since entitlement based on screen level have decided make class of constants or enums.
i thinking if user dont have access on screens of particular module should not show module.this problem not getting idea of implementing it.
i need proper structure can identify module of particular screen because have entitlement on screen not on module.
oneway thought of can create separate enums modulewise problem enum doesnt support inhertence , entitlement method have created common screens.
public enum reports //module name { productreport, //screen name orderreport //screen name } public enum admin //module name { dropdownmaintenance, //screen name usermaintenance //screen name } my method verify entitlement
public bool verifyentitlement(string screen,accessenum access) {}
Comments
Post a Comment