No edit summary |
mNo edit summary |
||
Line 10: | Line 10: | ||
<br /><br /><br /><br /><br /><br /><br /><br /><br />Create Access Groups through the AccessGroups editor in the Designer as shown below: Add the Ocl Expression below in the View Enable Expression (Enable of ViewModel edit Controls)<syntaxhighlight> | <br /><br /><br /><br /><br /><br /><br /><br /><br />Create Access Groups through the AccessGroups editor in the Designer as shown below: Add the Ocl Expression below in the View Enable Expression (Enable of ViewModel edit Controls)<syntaxhighlight> | ||
Singleton.oclSingleton.AllowedAccess | Singleton.oclSingleton.AllowedAccess | ||
</syntaxhighlight>To enable the AccessGroup on a ViewModel, | </syntaxhighlight>To enable the AccessGroup on a ViewModel, click on the 3 dots extreme of AccessGroups label, this will load Access groups view. Select the access group to control the page: | ||
[[File:Documentation Restricting data access 1729510330368 | [[File:Documentation Restricting data access 1729510330368.png|thumb|300x300px|left]]<br /><br /><br /><br /><br /><br /><br /><br /><br /><br />Run the application in the browser select the different access groups and observe the page response when the different access group to which the page is not attached responds as shown below.<br /><br /> | ||
<br /><br />[[Documentation:AccessGroups, InterestGroups and ViewModel-Enable|Interest Groups]] | |||
[[Documentation:AccessGroups, InterestGroups and ViewModel-Enable|ViewModel-Enable]] | [[Documentation:AccessGroups, InterestGroups and ViewModel-Enable|ViewModel-Enable]] |
Revision as of 11:39, 21 October 2024
Restricting Data Access in MDriven can be achieved in 3 ways which are:
Below is a sample model, with a singleton class that has 2 attributes: Allowed Access and Interested as Booleans.
Create Access Groups through the AccessGroups editor in the Designer as shown below: Add the Ocl Expression below in the View Enable Expression (Enable of ViewModel edit Controls)
Singleton.oclSingleton.AllowedAccess
To enable the AccessGroup on a ViewModel, click on the 3 dots extreme of AccessGroups label, this will load Access groups view. Select the access group to control the page:
Run the application in the browser select the different access groups and observe the page response when the different access group to which the page is not attached responds as shown below.