C# Class Microsoft.Legal.MatterCenter.Jobs.UpdateMatter

Show file Open project: Microsoft/mattercenter Class Usage Examples

Public Methods

Method Description
AssignPermissionToCatalogLists ( string listName, ClientContext catalogContext, string userEmail, string role, IConfigurationRoot configuration ) : void
AssignRemoveFullControl ( ClientContext clientContext, Matter matter, string loggedInUser, int listItemId, List listExists, bool assignFullControl, bool hasFullPermission ) : void

Assign or Remove Full Control base on parameter given.

CheckSecurityGroupInTeamMembers ( ClientContext clientContext, Matter matter, IList userId ) : GenericResponseVM
MatterAssociatedLists ( ClientContext clientContext, string matterName, MatterConfigurations matterConfigurations = null ) : List
RevertMatterUpdates ( Client client, Matter matter, ClientContext clientContext, MatterRevertList matterRevertListObject, string loggedInUserTitle, IEnumerable oldUserPermissions, int matterLandingPageId, bool isEditMode ) : bool

Reverts the permission of users from matter, OneNote, Calendar libraries and matter landing page

UpdateMatterStampedProperties ( ClientContext clientContext, MatterDetails matterDetails, Matter matter, PropertyValues matterStampedProperties, bool isEditMode, IConfigurationRoot configuration ) : bool
UpdatePermission ( ClientContext clientContext, Matter matter, List users, string loggedInUserTitle, bool isListItem, string listName, int matterLandingPageId, bool isEditMode ) : bool

Remove old users and assign permissions to new users.

UpdateUserPermissionsForMatter ( MatterInformationVM matterInformation, IConfigurationRoot configuration, System securePassword ) : void

Private Methods

Method Description
CheckFullPermissionInAssignList ( IList AssignUserNames, IList Permissions, string loggedInUserName ) : bool

Check Full Permission for logged in User.

GetMatterAssignedUsers ( Matter matter ) : string

Converts the matter users in a form that can be stamped to library.

GetStampPropertyValue ( object>.Dictionary stampedPropertyValues, string key ) : string

Checks if the property exists in property bag. Returns the value for the property from property bag.

PrepareUserPermission ( IEnumerable userPermissions ) : Matter

Fetches the users to remove permission.

RemoveFullControl ( ClientContext clientContext, string listName, string currentLoggedInUser, bool isListItem, int matterLandingPageId ) : void

Remove Full Permission.

RetrieveMatterUsers ( IEnumerable userPermissionOnLibrary ) : List

Gets the display name of users having permission on library.

Method Details

AssignPermissionToCatalogLists() public method

public AssignPermissionToCatalogLists ( string listName, ClientContext catalogContext, string userEmail, string role, IConfigurationRoot configuration ) : void
listName string
catalogContext ClientContext
userEmail string
role string
configuration IConfigurationRoot
return void

AssignRemoveFullControl() public method

Assign or Remove Full Control base on parameter given.
public AssignRemoveFullControl ( ClientContext clientContext, Matter matter, string loggedInUser, int listItemId, List listExists, bool assignFullControl, bool hasFullPermission ) : void
clientContext ClientContext Client context object
matter Microsoft.Legal.MatterCenter.Models.Matter Matter object
loggedInUser string Name of logged in user
listItemId int ID of the list
listExists List List of existed list
assignFullControl bool Flag to determine Assign or Remove Permission
hasFullPermission bool
return void

CheckSecurityGroupInTeamMembers() public method

public CheckSecurityGroupInTeamMembers ( ClientContext clientContext, Matter matter, IList userId ) : GenericResponseVM
clientContext ClientContext
matter Microsoft.Legal.MatterCenter.Models.Matter
userId IList
return Microsoft.Legal.MatterCenter.Models.GenericResponseVM

MatterAssociatedLists() public method

public MatterAssociatedLists ( ClientContext clientContext, string matterName, MatterConfigurations matterConfigurations = null ) : List
clientContext ClientContext
matterName string
matterConfigurations Microsoft.Legal.MatterCenter.Models.MatterConfigurations
return List

RevertMatterUpdates() public method

Reverts the permission of users from matter, OneNote, Calendar libraries and matter landing page
public RevertMatterUpdates ( Client client, Matter matter, ClientContext clientContext, MatterRevertList matterRevertListObject, string loggedInUserTitle, IEnumerable oldUserPermissions, int matterLandingPageId, bool isEditMode ) : bool
client Microsoft.Legal.MatterCenter.Models.Client Client object
matter Microsoft.Legal.MatterCenter.Models.Matter Matter object
clientContext ClientContext ClientContext object
matterRevertListObject Microsoft.Legal.MatterCenter.Models.MatterRevertList MatterRevertObjectList object
loggedInUserTitle string Logged-in user title
oldUserPermissions IEnumerable Old library users
matterLandingPageId int List item id
isEditMode bool Add/ Edit mode
return bool

UpdateMatterStampedProperties() public method

public UpdateMatterStampedProperties ( ClientContext clientContext, MatterDetails matterDetails, Matter matter, PropertyValues matterStampedProperties, bool isEditMode, IConfigurationRoot configuration ) : bool
clientContext ClientContext
matterDetails Microsoft.Legal.MatterCenter.Models.MatterDetails
matter Microsoft.Legal.MatterCenter.Models.Matter
matterStampedProperties PropertyValues
isEditMode bool
configuration IConfigurationRoot
return bool

UpdatePermission() public static method

Remove old users and assign permissions to new users.
public static UpdatePermission ( ClientContext clientContext, Matter matter, List users, string loggedInUserTitle, bool isListItem, string listName, int matterLandingPageId, bool isEditMode ) : bool
clientContext ClientContext ClientContext object
matter Microsoft.Legal.MatterCenter.Models.Matter Matter object
users List List of users to remove
loggedInUserTitle string
isListItem bool ListItem or list
listName string
matterLandingPageId int List item id
isEditMode bool Add/ Edit mode
return bool

UpdateUserPermissionsForMatter() public method

public UpdateUserPermissionsForMatter ( MatterInformationVM matterInformation, IConfigurationRoot configuration, System securePassword ) : void
matterInformation Microsoft.Legal.MatterCenter.Models.MatterInformationVM
configuration IConfigurationRoot
securePassword System
return void