Provides support for user roles in the annotations framework.
public class AnnGroupsRoles
Public Class AnnGroupsRoles
public sealed class AnnGroupsRoles
ref class AnnGroupsRoles
AnnGroupsRoles supports adding roles for a multi-user application support in the annotations framework. This is accomplished by the following concepts:
Operations: This defines the annotations operations to allow or deny. Such as creating or deleting new annotation objects. The AnnOperationType enumeration contain a list of all the operations that can be controlled using this system. Each operation belong to a role, such as a view or an edit operation. Operations can also controlled individually if such fine tuning is required.
Roles: This defines common roles such as a view only or view and edit. AnnRoles defines the list of roles used by the application.
Groups: This defines the group (or memberships) that have access to a role such as an Admin, a Guest or any other custom group. This is accomplished through the GroupRoles dictionary which define the group (as the key) and the roles that belong to it (as a collection of roles).
Users: Finally, this defines the individual users of the system. Each user must belong to a group. This is accomplished through the GroupUsers dictionary which defines a group (as the key) and the users that belong to it (as a collection of user names).
AnnotationsRolesDemo projects contains a of multi-user annotations application. Refer to the source code of the demo for a full example.
To create a multi-user application:
Create an instance of AnnGroupsRoles
Define the roles required by creating an instance of AnnRoles. AnnRoles contain common roles that can be used as is such as AnnRoles.ViewAll, AnnRoles.EditAll and AnnRoles.FullControl to be able to view/edit and have full control over all annotation objects for all users. And AnnRoles.View and AnnRoles.Edit to be able to view and edit only the annotation objects created by the specified user.
Define the groups required by the application. This is a list of names of the groups such as "Admin" and "Guest" and any other group defined by the application. Assign roles to each group by adding values to the GroupRoles dictionary.
Define the users of the application. Each user must belong to a group, so add all the user names to the GroupUsers dictionary.
Set the current logged in user to CurrentUser.
Set the AnnGroupsRoles object created into the all the AnnContainer objects in the application.
When the application runs and the various annotations operations are invoked on this container, the system will map the CurrentUser to its group to deduce the roles. Then it will check if the group contains the correct role before allowing or denying the operation.
The annotation framework will accomplish this by calling the IsUserInRole method with the user name and an AnnOperationInfoEventArgs instance that contains default details of the operation (for instance, the user is deleting an object). The default mapping of the operation versus the role (deleting an object is an Edit operation) will be invoked and the method will return a boolean value to the caller annotation method to continue or abort the operation.
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.