Weekend research time again! it was about Calendars in SharePoint Online.
This was what we needed-
Students have access to their school sharepoint online site. Site has a calendar that they should use to add homeworks/ other agendar items. When a student logs in to the site they should just see their entries and not others.
Sounds simple enough eh! It is too, if you know where to look for solution. 🙂
Item level permissions can be set via Workflows in lists/libraries in SharePoint. In our environment workflows can be created either by using
- SharePoint designer 2013 or
- Nintex workflow for Office 365
For this solution, I chose to go with SharePoint to enable custom workflow permission designer 2013 to create a SharePoint designer 2010 workflow(I know, its kinda weird, but hey this works so no questioning, just go with it OK!) and an Impersonation Step action in the workfllow
Create a calendar in your SharePoint Online site(duh!)
Create a custom SharePoint group in your site, to store the list of your school students for whom you would like to provision the homework-calendar.
In the image below, I have left the permissions default, you could customize it to further control the group access as you see fit in your environment. Edit permission rerquired to submt calendaar entry.
“ListOfStudentsUsingCalendar” SharePoint group has Edit permission to the list.
This step is optional, but in case you wish to customize the permission further, make sure that you leave just the students group and a owners group in the calendar permission. In this example I left the site owners group as well as ListOfStudentsUsingCalendar group and removed the rest. To do this, you have to open the Calendar Settings
First stop inheriting permission. To do that, List Settings > Permission for this list > STOP inheriting permission
Edit the calendar clicking SharePoint Designer 2013 icon in menu bar of calendar
Give it a name and describe what you want to do in the description text box. Most important step here is to select the Platform Type as SharePoint 2010 workflow
Now, you can start customizing the workflow steps. Woot!
Add Impersonation Step right above the default Step 1 action.
- Type Inherit and select Inherit parent permission for item in this list to Current Item
- In the next workflow step, you need setup custom permission for the calendar entry created by the student. You can do this by clicking Edit hyperlink in action ‘then Add Edit to item in Current Item option’, Add List Item Permission pop-up window opens,
- Next workflow step, you need to remove Edit permission for the Students SharePoint group
- You can include log messages in between steps, to track what steps gets completed.
- Now whenever a student submits entry in the calendar, this workflow sets the custom permission
- Adds edit permission for the student who created calendar entry.
- Removing Edit for your ListOfStudentsUsingCalendar SharePoint group
Thats all! In the image below you can see that Test R.Student cannot see, Test S. Students entry and vice versa.