how to set access control back to inherited

im looking to see how to tell via SDK if a given folders access control is being inherited or not.

if it has folder level access set i then want to remove that and get it back to being only inherited.

i have a decent understanding of how access control works and i have used the sdk to rebuild access control and then do things like add another user list to it and apply it. but i just need some help in how to kind of do the opposite of that. how to get a folder back to inherited only?

I see there is a aaApi_CopyInheritedAccessControl. but im a little confused for example to copy the folder access the parameters would just be the type (project), then the folderid, then 0 for the workflow to get the folder access.

it just returns a bool. so i dont get an access object or anything. is the name just a poor name and its not coping but its actually applying the access control to the folder? is it replacing the existing access control on the folder to now only be inherited? 

thanks for any help.

Parents
  • so i just tried applying the access control to nothing for the folder and it then went back to inheriting. so i have that part. but i still would like to know how to tell if the folder has broken inheritance or not. for performance reasons i like like to check the folder for broken inheritance before applying the access to nothing.

    any ideas? 

    Also i tried the copyinheritedaccesscontrol and it failed saying its already in use.. not really too sure what that API is doing.

Reply
  • so i just tried applying the access control to nothing for the folder and it then went back to inheriting. so i have that part. but i still would like to know how to tell if the folder has broken inheritance or not. for performance reasons i like like to check the folder for broken inheritance before applying the access to nothing.

    any ideas? 

    Also i tried the copyinheritedaccesscontrol and it failed saying its already in use.. not really too sure what that API is doing.

Children