Wednesday, June 2, 2010

Object Class Names of the The Authorization Service

The IAuthorizationService interface exposes two methods you can use to obtain object class names available in TFS.

The first one is ListObjectClasses. It returns a string array of IDs of all defined object classes :

CSS_NODE
EVENT_SUBSCRIPTION
ITERATION_NODE
NAMESPACE
PROJECT

The other one is ListObjectClassActions. You need to supply an object class id as a string parameter to the method. It will return a string array of actions defined for a specified class. For example, if you supply CSS_NODE as a parameter, it will return the following action ids:

GENERIC_READ
GENERIC_WRITE
CREATE_CHILDREN
DELETE
WORK_ITEM_READ
WORK_ITEM_WRITE

No comments:

Post a Comment