fiogf49gjkf0d Hi,
I want only Contract role users to view the attachment uploaded by them or other Contract users. Users other than Contract role should not view the attachment uploaded by Contract role users.
Please advise if you know any method to implement this. I tried implementing the following method, manually setting the ContractID in Attachment table while saving the attachment.
The below code checks if ContractId is available and the users has access. But the problem i faced in implementing this method is that i'm not able to save the ContractId in attachment table.
if (_roleSecurityService != null) { isContract = _roleSecurityService.HasAccess("Contract"); }
for (int i = 0; i < list.Count; i++) { if ((!isContract ) && (!string.IsNullOrEmpty(list.ContractId))) { list.Remove(list); } }
Please advice. Thanks in advance for your help.
Regards, Ram. |