admShareFilter
Description
Add shares to a filter based on project, role, group, user.Add shares to a filter based on project, role, group, user. For each call of this function a new set of shares will be added on top of the existing ones.
Parameters
Return Type
Boolean (true/false)
Returns true if the operation succeeded.
Example
number filterId = createFilter("TestFilter", "Description", "project = TEST", "admin"); // this will create a filter with no shares(private filter)
// for global and loggedin share type, the default shareRight is view
admShareFilter(filterId , "global"); // all the users(logged in or not will have view permissions for the created filter)
admShareFilter(filterId , "loggedin"); // only the logged in users will have the permissions for this filter (also only for viewing)
//the user admin will have permissions for both view and editing
admShareFilter(filterId , "user", "view" ,"admin");
admShareFilter(filterId , "user", "edit" ,"admin");
//the permissions are now set for project test for view and edit
admShareFilter(filterId , "project", "view" ,"TEST");
admShareFilter(filterId , "project", "edit" ,"TEST");
//the permissions are now set for project test for view and edit AND as an extra restriction based on the "Administrators" role
admShareFilter(filterId , "project", "view" ,"TEST","Administrators");
admShareFilter(filterId , "project", "edit" ,"TEST", "Administrators");
//the users from the "jira-administrators" group will have permissions for this filter
admShareFilter(filterId , "group", "view" ,"jira-administrators");
admShareFilter(filterId , "group", "edit" ,"jira-administrators");