Provides support for user roles in the annotations framework.
function lt.Annotations.Engine.AnnGroupsRoles
class lt.Annotations.Engine.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).
The 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 ViewAll, EditAll and FullControl to be able to view/edit and have full control over all annotation objects for all users. And View and 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.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document