Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I would like to list all users and SP groups in a dropdown list when uploading documents.I need this so i admins can select a specific group or users to assign permissions too.

Is this possible? I tried using the lookup column but didn't have the groups list.

Cheers and thanks in advance

share|improve this question
    
You can custom code it. Iterate through your SPPrincipals and add each to a DropDownList. You'll also have to custom code the permissions assignment. –  RJ Cuthbertson Oct 30 '12 at 20:28
add comment

1 Answer

up vote 1 down vote accepted

To list groups and users use: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.groups.aspx http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.allusers.aspx

Note that to be able to use the above APIs the user will need Enumerate permissions permission level.

To assign permissions, you will have to write custom code that creates roleassignments for each user selected and adds these assignments to the uniquely permissioned SPWeb or SPList or SPListItem as appropriate.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.