Fire up your applications with Jetfire

Jetfire Wiki

Edit

Access Construct

The access construct can be added to property and method declaration making the access modifier dynamic. That is a method's or property's access modifier (whether it is private or public) can be changed programmatically.

For example 'MyMethod' will be 'public' when the logged in user has the role 'MyRole'. When the logged in user does not have the role 'MyRole' then the method 'MyMethod' will be private.

public void MyMethod() :access(MyRole)
{
...
}

The access construct can also be used with properties.

public void MyProperty:access(MyRole)
{
get;
set;
}

In the this example the property can be set if logged in user has the role of "MyRole".

public void MyProperty
{
get;
set:access(MyRole);
}

The access construct can also use a boolean property as parameter. See Basket Example (Controlling when a method can be called)

ScrewTurn Wiki version 2.0.33. Some of the icons created by FamFamFam.