Setting the user's rights on an object

In order to set the user's rights on an object you need to:

  1. Check that there is an ObjectPrincipal object associated with the user. If there is not one, create one.

    Note:    Don't use AnyPrincipal to do this. AnyPrincipal is only used to read the user's rights and not to edit them.

  2. Check that the right you are granting or denying exists. If it does not, create it.
  3. Set the right. To set the right as unspecified, delete it from the collection.

Note:    You may or may not want to set the inheritance flags as well, depending on what you need to do.

Go to the next step: Retrieving and adding the ObjectPrincipal.



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com