0

I have a blank site in SharePoint 2013 in which i activated CommunityFeature and i created a discussion board app which is displayed in a web part.

Now, i want to be able to change the discussion visibility ... E.g. when i click on new discussion i want to have a people picker that allows me to choose people or groups that are allowed to see and reply for that discussion...

How can this be made? can anyone help me please?

1

Consider setting up permissions right after the topic is created.

In simplest case you can do it manually: click Manage discussions link, select discussion and click Shared With:

enter image description here

Or you can create a workflow for that, that would pick the settings from the field.

This opensource project provides a set of workflow actions for setting permissions:

https://sp2013workflowactivities.codeplex.com

These can be used even in O365!

Following workflow actions are available:

GetRoleDefinitionId - gets role definition id using role definition name. Please take into account that role definition names are localized.

GetRoleDefinitionIdByRoleId - gets role definition id using SPRoleType enumeration value.

AddRoleAssignment - assigns the specified role definition to the specified principal id using or not break role inheritance option.

AddRoleAssignments - assigns the specified role definition to the specified principal id collection using or not break role inheritance option.

DeleteRoleAssignments - removes principals specified by ids from role assignment collection of the specified object.

ResetRoleInheritance - resets role inheritance of specified securable object and inherits role assignments from the parent securable object.

And for those who're interested in how it works, here is a post explaining how to set permissions using REST:

  • thenk you for your response, but here this will be too much time taking if i have to go to each topic and change its permissions manually ... is there any way to do this programmatically the way i can set these permissions while clicking on save button after clicking on new discussion? – Haithem KAROUI Sep 5 '14 at 10:54
  • Yes, as it is explained in the answer, you can definitely use a workflow approach for that. Do you have any experience with workflows? – Andrey Markeev Sep 5 '14 at 10:57
  • 1
    you can always create a management view. go to list settings, and find "Create view" link somewhere below. then, choose to create view based on Management view – Andrey Markeev Sep 5 '14 at 11:18
  • 1
    About workflows in brief: Workflows are essential part of SharePoint, that everyone in SP should learn. How workflows work: first, user does something on site, e.g. adds new document or list item or edits existing one. This action fires the workflow process. Workflow is created using SharePoint Designer from a set of Workflow actions, allowing you specify steps that need to be done. For example, you can send notification emails, initiate approval process, etc. – Andrey Markeev Sep 5 '14 at 11:20
  • 1
    Karoui, I'm eager to help, but as all people do, I have limited time and some other things happening around me :) I suggest you to post your questions here on SP SE, one by one, and also don't forget to use Google, there's a huge amount of information about SharePoint across the web. Also, if you find answers here on SP SE helpful, don't forget to accept them and upvote them, this will help other people to understand which answers are useful, and increase willingness of experts to help :) – Andrey Markeev Sep 5 '14 at 18:49
0

I don't see a way to achieve this with the community feature. How you might achieve this is to have discussions lists in your blank site (rather than the community feature), have unique permissions on each list and "share" this list with the people you wish to participate on a given topic. The question is, is a separate list for each topic overkill for your requirements.

  • yes, i cannot have a seperate list for each topic – Haithem KAROUI Sep 5 '14 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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