Apply access control and inherited access control

We have a top level access control setup, and all the subfolders inherit from the top level.

Now, through a program, I will create a subfolder, which I will assign some access control on the folder level, and I need the inherited access control together.

How can I achieve this through the SDK?

Thanks,

Lily

  • Dear Lily,

    You can..

    I believe you will need to copy the inherited access rights to the new folder as an assignment then add the new rights.

    Note all the access rights will be assigned to this new folder so if you change the top level access rights there will be not changes in the new folders assigned access rights.

    This is standard access control behavior in ProjectWise  - you can do all this with the SDK.

    Best Regards,

    Ian Emery

  • Lily, just a side note. If you are going to be setting permission on many folders you will want to run the program when people are not in ProjectWise.  A permission setting application has a tendency to make PW very slow to respond to people browsing pw explorer and checking in/out files while it runs.  For more precise help on the functions you would need.  Take a look at aaApi_CopyInheritedAccessControl to get the inherted objects, then to add new ones look at aaApi_AssignAccessList.

  • Ian,

      If I copy the inherited access rights, I guess the access rights then are applied.

    After I add my new rights,  then the inherited one will be lost.

    is that: I need to get the inherited rights first,  I did not see an api to do that...

    then combine with my new rights to api: aaApi_ApplyAccessControlList

    Another problem, I might need to change the access rights (remove user, add users), but keep the userlist unchanged.

    For this case, I must first get the current access rights, and based on this, add/remove users to construct a new access set to apply.  

    Am I correct?

    Thanks,

    Lily

  • Dear Lily,

     If I copy the inherited access rights, I guess the access rights then are applied. ** yes

    After I add my new rights,  then the inherited one will be lost.  ** no..

    - copy\apply the inherited access rights then they are apllied  - now you can add new rights\modify these rights.

    - and they are applyied to "this" object but still inherited to sub-objects (sub folders etc)

    Another problem, I might need to change the access rights (remove user, add users), but keep the userlist unchanged.

    ** you can add individual users but this is usually not very "clean"

    - you cannot use the same userlist more than once with differnt user in the list - the user list is a global list.

    For this case, I must first get the current access rights, and based on this, add/remove users to construct a new access set to apply.  

    ** I suspect this is correct

    Additonally:

    - You can program all teh actions you can perform with the projectwise security tab..so you can try before you program..

    - I believe Dean has done more programming with managing access rights this than myself.

    Best Regards,

    Ian Emery

  • Ian, Thanks for your reply!

    I copied the inherited one, and it's applied.

    then I use the aaApi_ApplyAccessControlList to apply the new rights, then only the new ones are applied.

    From the SDK for aaApi_ApplyAccessControlList, it says:

    "All the existing access control entries for the specified types are removed prior to applying the new access, thus this function can be used to add, to remove, or to modify access control list of the object."

    what api should I use? to only add some new rights?

    aaApi_AssignAccessList is deprecated, and I am not sure if this api works for my purpose.