In my previous post on building a video portal with approvals, we started the necessary steps to build an internal video portal for SharePoint online. ICYMI, the things we covered:
- Business problem
- Creating production and staging sites
- Excluding the staging site from the retention policies
- Configuring the SharePoint taxonomy and term sets
We’re going to continue on in this post with the site customization.
- Configuring the Sites
Configuring the Sites
There are a few site configurations that need to be performed to prepare the environment for the workflow triggers. In this demo, I want to create two libraries of content in the staging site, which will be tied to two corresponding libraries in the production site and then enable approvals on them.
For the Production site, I want to update the permissions so that normal users can’t contribute new files to the site (since all the files posted should come from the staging site). I also want to configure a few web parts on the main page of the site and create new pages for the libraries.
Finally, for both sites, I want to configure additional columns to capture things like descriptions and managed metadata or terms.
Configuring the Staging Site
Since one of our business requirements specifies some sort of approval needs to happen before content is available, we’re going to enable the approvals feature in the SharePoint library.
For purposes of this example, we’re going to create two document libraries–one for Cooking-related videos and one for Viral videos. For this use case, I thought it might be easier to manage content categories and permissions with separate document libraries, but you could also accomplish similar ends with just using folders. You might be a little more limited in assigning which term sets you want to use, but it really depends on your business goals.
Creating document libraries
- Navigate to the Staging SharePoint site.
- Select the Settings gear icon and then click Site contents.
- Select +New > Document library.
- Name the library to match one of the term sets you created earlier (in the examples, Cooking and Viral were the term set names I used). Click the Site contents link on the left side of the page and repeat for the other term set name. In the end, you should have two new additional document libraries.
Next, we’ll move on to enabling the approval settings for the library.
Enabling approvals for the library
The approvals configuration is what we’ll use as the basis for the flows later on. With this configured, when an item is added to the library, it will be added with a status of Pending. With the default settings enabled, this will prevent other people from viewing the content (only the author and the approver will be able to see it). Later on, we’ll use move Pending items as part of the approval process to our production library.
- Click one of the newly created document libraries and then select the Settings gear icon. Select Library settings.
- Under General Settings, click Versioning settings.
- Select the Yes radio button for Require content approval for submitted items? setting. Adjust the defaults if desired, but I’d recommend leaving the Only users who can approve items (and the author of the item) radio button selected under the Draft Item Security section. Since the business requirement was to ensure that the content isn’t visible to anyone else until it’s been approved, this helps meet that requirement. Click OK to save.
Now, it’s time to add the additional data columns for our library.
Configuring columns for the library
Columns are used to store data about an item in SharePoint. if you’re familiar with a spreadsheet, you’re familiar with columns. In SharePoint, columns have types, indicating what kind of data can be stored in them (such as single or multiple lines of text, yes/no values, currency, or dates).
- Under the Columns section, we’re going to create some columns for submitters to add metadata about their item. The default columns are Title [text], Created [date],Modified [date], Created By [identity], Modified By [identity], and Checked Out To [identity]. We’re going to add columns for Description and Enterprise Tags (managed metadata). These are the terminology that many of my customers use, but feel free to leave the default labels or choose your own. To add a column, select Create column.
- Enter Description in the column field, and then select the Multiple lines of text radio button. You can choose additional options, such as data validation or whether a field is required. Some column types will present additional options to configure, so be sure to look at all of them. Click OK when finished.
- Click Create column.
- Set the column name as Enterprise Tags and the type as Managed Metadata.
- Scroll down and select the Allow multiple values checkbox if you want to be able to tag an item with multiple terms. For this example, I’ll be turning it on, since it makes sense for the type of content I’m posting.
- Finally, select the Use a managed term set radio button, and then select the Video > Cooking term set we created earlier (or go crazy and select a different term set you created).
- Click OK.
You can repeat the steps under Enabling approvals and Configuring columns for the other library you created.
In order to make the site accessible to users who are going to upload content, you’ll need to add them to the site members group. You may wish to restrict it to a certain subset of users or groups, or you may wish to open it up to everyone. Either way, you’ll need to specify the membership. For this example, we’re just going to give everyone in the organization the rights to contribute to the staging site.
- Navigate to the Staging site, click the Settings gear, select Site permissions and then select Invite people.
- Select Advanced permissions settings.
- Click the site’s Members group.
- Select New. Select Add Users.
- Start entering Everyone and select the object for Everyone except external users.
- Click Show Options and deselect Send an email invitation.
- Click Share.
Users will now be able to upload to the staging site. On to configuring the Production site!
Configuring the Production Site
I feel a little bit like a cheater doing this, but for the production site, you’ll follow the same steps as under Configuring the Staging Site, but you’ll leave out the Enabling approvals subsection. Since only previously approved files will make it to this site, the approvals section is unnecessary. The other tasks you’ll want to perform are:
- Restricting permissions to prevent non-administrative users from contributing content to the site
- Adding highlighted content webparts
We’ll start with the permissions.
Restricting users from contributing content
Since the only content being posted to this site should come from the Flow that’s going to post them here, we’ll want to prevent people from uploading their own content. There are a number of ways to manage the permissions for this site. In the interest of simplicity, I’m just going to change the default permission for Members to something more restrictive (which will make them unable to upload new content). You may approach permissions on a library level as well.
Since the available default permissions levels aren’t granular enough, we’re going to create a new one and apply it to the Members group.
- As an administrator, navigate to the production site.
- Click the Settings gear icon and then select Site permissions link.
- Select Advanced permissions settings to open the SharePoint Classic permissions management.
- Select Permissions Levels.
- Select Add a Permission Level.
- Add a name and a description for the permissions level.
- Under List Permissions, select the following permissions:
– Edit Items
– View Items
– View Versions
– Create Alerts
– View Application Pages
– View Pages
– Browse User Information
– Use Remote Interfaces
– Use Client Integration Features
– Manage Personal ViewsClick Create when finished.
- Click the Permissions link in the breadcrumb to be taken back to the SharePoint classic permissions page.
- Select the Members checkbox and then click Edit User Permissions.
- Clear the default permission (Edit) and select the newly created custom permission. Click OK.
With the group permissions created, we can repeat the steps used in the Staging section and add the Everyone group to the Members group.
Configuring the Members group
- If you’re still in the SharePoint classic permissions page, click the Members group to expand the membership list. If you’re not there, you can get to it easily by navigating to the Production site, clicking the Settings gear, selecting Site permissions and then selecting Advanced permissions settings, and then clicking on the Members group.
- Click New and then select Add Users.
- Enter Everyone in the box and select Everyone except external users.
- Optionally, expand Show Options and deselect the Send an email invitation checkbox. Click Share when finished.
Congratulations! You’ve foiled user uploads to the production site while making sure everyone can only read it and update the description and enterprise tags (managed metadata)!
Now, to finish off the Production site customization with a highlighted content webpart.
Adding highlighted content webpart
By this point in the game, if you were familiar with SharePoint, you may have asked yourself “why did you use standard document libraries instead of configuring asset libraries?” The answer is simple: the modern site layout webparts don’t allow you to interact with asset library storage types. Instead of displaying the thumbnails, they just display a text box. It’s lame. So, save yourself a lot of grief and just use a normal document library.
The highlighted content webpart enables you to show a filmstrip or carousel of content on the site’s landing page, which makes it look pretty snazzy. And, we all like snazzy things.
In this example, we’re going to remove webparts that we don’t need and add a highlighted content webpart for each of the libraries we created–that way, users can get previews of the most recent videos uploaded to each category. You can obviously choose to do it another way–I’m just trying to get the idea across that this functionality is available with minimal configuration.
- As an administrator, navigate to the production site.
- On the right side of the page, click the Edit button.
- Select the web parts you want to delete and then click the trash can icon. In this case, I’m going to delete the Events, Documents, Quick links, and People profiles web parts.
- Once those are gone, click the + button in between sections and then select the Highlighted content web part.
- For the web part, select the Edit button (pencil icon).
- In the details pane for the web part, select the source as A document library on this site, and then select one of the document libraries that was created earlier.
- Under the Layout section, select either Carousel or Filmstrip.
- Click the X to close the detail pane (yes, there’s no save button, and yes, it bugs me, too).
- Click the + button again and add another Highlighted content web part.
- Repeat steps 5-7, selecting the other document library created for this exercise.
- Click the Republish button on the page to make this draft version of the page public.
Once we start approving videos in the staging site, they will show up in the filmstrip or carousel on the production site.
You’ll probably want to edit the hero webpart (the big web part at the top with the pictures) and customize it to point to individual pieces of content, pages, libraries, or other links of your own (as opposed to our documentation).
By the end of this post in the series, you should have completed the following tasks:
- Created staging and production sites
- Updated the Members group on the Staging and Production sites
- Configured a custom permission level on the Production site to prevent people from uploading content.
At this point, we’re ready to start connecting the dots with some workflows. In the next post, we’re going to look at building the workflows with Microsoft Power Automate.