# Page and Content Protection
On Villanova's Web Content Management System (WCMS), you can protect pages, content, and other digital assets by assigning groups that have the authority to view those assets. If users without the correct authorization attempt to view them, the platform will return an error. You can manage these errors for your application with dedicated error pages or by adding logic to your widgets or FreeMarker templates.
For content with no restrictions, the default setting is Free Access for group ownership.
# Create a Group
Pages, content, and digital assets (images and files) are protected with group assignments. You can add new groups in the Villanova App Builder as follows:
- Go to
Users→Groupsfrom the left navigation - Select
Add - Enter a
Nameand aCodefor your group` - Go to
Users→Managementin the left navigation menu to createUsersand assign them to the new group.
An Owner Group is assigned when pages, content, and assets are created. The Owner Group indicates the team who owns the item and can make modifications. Additional groups can be given viewing access to the item via the Join Group field.
Note: The
Owner Groupcan not be changed after an item is created.
# Protect a Page
- Select
Pages→Managementfrom the left navigation. - Create a new page. Assign values as needed.
- Assign an
Owner Group. - (Optional) Add groups via
Join Groupto allow viewing access. - Complete configuring the page and select
Save.
Now only users assigned to the Owner Group or Join Group will have the ability to view the page. They can manage and edit the Page if they have the appropriate role within the App Builder and are part of the Owner Group.
To test this, navigate to the new page URL from a private or incognito browser window, and you will be redirected to the default
Sign in to Proceed Furtherpage of your application. TheSign in to Proceed Furtherpage can be changed by going toPages→Settingsand picking the page to render for users who need to sign in.
# Protect Content
Select
Content→ManagementClick the
Addbutton and choose the type to create from the drop-down listAssign an
Owner Group.(Optional) Add groups via
Join Groupto allow viewing access.Finish configuring the page and select
Save
Only users within the Owner Group can view and edit the content. Users assigned to groups listed under the Join Group field can view it. See the FreeMarker tags section below for information on creating custom widgets that utilize protected content.
Access to Images and Attachments
An item with the Free Access assignment offers viewing access to everyone. Items with Free Access can be added to protected pages.
# Protect Images and Attachments
Images and attachments uploaded to the CMS can be protected by assigning groups.
- Select
Content→Assetsfrom the left navigation - Click
Addto select and upload your file(s) - For the
Groupfield, select the owner group to grant viewing and editing privileges - Only users within the assigned
Groupwill have the ability to view and edit the asset you've created- The asset is available to content such as pages with the same
Groupassignment unless it has been assignedFree Access.
- The asset is available to content such as pages with the same
# FreeMarker Tags and Consuming Protected Resources
Villanova supports a set of FreeMarker tags to assist in accessing and using protected assets in widgets and pages. The if-authorized and tag-nav tags can help in rendering page lists and fetching assets.
The content and content-list tags also provide the ability to fetch and render protected content and lists of content.
Additionally, REST APIs allow clients to fetch protected pages and assets by group via query parameters. The content REST APIs also include the ability to filter by group and access level.