3

I have requirement in which a group is to be given a unique permission on discussion board where they can read and add replies but should not be able to add new list items(discussions).

I tried giving different permissions but nothing seems to work so far.

2 Answers 2

2

Add a event receiver to list and then check who is adding what, e.g. user who is adding item with it's content type "Message"

Don't think there's any specific permissions level there for what you want.

Example

public override void ItemAdding(SPItemEventProperties properties)
{
    SPUser userCurrent = properties.Item.web.CurrentUser; // it's hand written but you can get these objects
    SPGroup group;
    //... get your group here..
    bool isMember = userCurrent.InGroup(group);
    if (isMember && properties.ListItem.ContentType.Name == "Message")
    {
        continue;
    }
    else
    {
        properties.Cancel = true;
        properties.Status = SPEventReceiverStatus.CancelNoError; //This will suppress the error
    }

}

For more information check this link out. http://social.msdn.microsoft.com/Forums/sharepoint/en-US/794dbfc0-839e-493d-b3d6-26c9cdd9824f/how-to-create-event-receiver-for-sharepoint-discussion-baord-reply-using-c-code

If in ItemAdding context is coming as null then try solution in this link. http://social.msdn.microsoft.com/Forums/sharepoint/en-US/5283966d-9d7a-4d11-ba67-a8d062932025/get-current-logged-user-name-in-even-handler

1

I fear this is not possible out-of-the-box because both, the discussion and single posts are the list items of one and the same list. They have different content types, but I don't know any possibility to configure permissions for different content types on one list.

A possible solution: You could hide the link to the discussion library and only provide the link to certain discussions. So people don't see the "create new discussion" links.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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