Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Top level pages #5118

Merged
merged 6 commits into from
Jul 24, 2022
Merged

Top level pages #5118

merged 6 commits into from
Jul 24, 2022

Conversation

DanielBolef
Copy link
Contributor

@DanielBolef DanielBolef commented May 9, 2022

Fixes #5103

This PR grants add page permissions for top level pages to users that have add page permissions for the home page. Also adjusts default permissions of new top level pages to match those of the home page so that users are less likely to create pages they cannot edit.

Use home page permissions as default when creating a top level page
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Pages/PagesControllerImpl.cs
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Dnn.PersonaBar.Extensions.csproj
@dnfadmin
Copy link

dnfadmin commented May 9, 2022

CLA assistant check
All CLA requirements met.

DanielBolef and others added 3 commits May 19, 2022 15:12
Undid some changes no longer needed
Added SQL for PortalPermission Table and related SPs
Platform/Website/Providers/DataProviders/SqlDataProvider/09.11.00.SqlDataProvider
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Pages/PagesControllerImpl.cs
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Services/PagesController.cs
Added PortalPermission Controller class
Added PortalPermission Info class
Added PortalPermission Collection class
Expanded PortalPermission Table
Added vw_PortalPermission View
Added SPs for PortalPermission
Added data providers for PortalPermission
Added PortalPermission to PortalInfo
Added Helper functions for PortalPermission
Added caching for PortalPermission
Fixed spelling errors
Platform/Website/Providers/DataProviders/SqlDataProvider/09.11.00.SqlDataProvider
Platform/Website/Providers/DataProviders/SqlDataProvider/UnInstall.SqlDataProvider
@sleupold
Copy link
Contributor

I strictly disagree to creating an new table.
There is already a table for page permissions (TabPermissions) and no need for creating yet another one.

Copy link
Contributor

@sleupold sleupold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with this solution, there shouldn't be created yet another table for specific page permissions. please use existing table TabPermissions according to the discussion of this feature.

@bdukes
Copy link
Contributor

bdukes commented May 27, 2022

@sleupold these permissions don't pertain to a specific tab, they pertain to all of the tabs in a portal, so we can't use the TabPermission table

Added PortalPermission checks to PermissionProvider
Changed Permission Codes
Use Home page permissions as default when adding top level pages
New tabs created in GetTabById now set PortalId to current portal
Platform/Website/Providers/DataProviders/SqlDataProvider/09.11.00.SqlDataProvider
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Pages/PagesControllerImpl.cs
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Pages/Security/SecurityService.cs
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/MenuControllers/PagesMenuController.cs
@bdukes
Copy link
Contributor

bdukes commented Jun 7, 2022

This PR is ready for review. It adds the concept of PortalPermissions and introduces two permissions, Page Admin and Add Top Level Page. In the default/base permission provider, a user with the Page Admin permission for a site will have access to all permissions for every page of the site.

It also adjusts the default permissions when adding a top-level page to be a copy of the home page (in an attempt to avoid scenarios where users are creating pages that they cannot access).

This PR does not include frontend changes to manage these new permissions. At the present time they are managed only through the database. Let us know if the existence of a management UI is a blocker.

/cc @DanielBolef

Copy link
Contributor

@donker donker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great enhancement IMHO

@mitchelsellers mitchelsellers merged commit 7a34b6f into dnnsoftware:develop Jul 24, 2022
bdukes added a commit to bdukes/Dnn.Platform that referenced this pull request Jul 27, 2022
…l-pages"

This reverts commit 7a34b6f, reversing
changes made to 327b1f5.

Platform/Website/Providers/DataProviders/SqlDataProvider/09.11.00.SqlDataProvider
Platform/Website/Providers/DataProviders/SqlDataProvider/UnInstall.SqlDataProvider
Dnn.AdminExperience/ClientSide/Pages.Web/src/services/securityService.js
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Pages/PagesControllerImpl.cs
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Components/Pages/Security/SecurityService.cs
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/MenuControllers/PagesMenuController.cs
Dnn.AdminExperience/Dnn.PersonaBar.Extensions/Services/PagesController.cs
valadas added a commit that referenced this pull request Jul 27, 2022
Revert "Merge pull request #5118 from DanielBolef/top-level-pages"
@valadas
Copy link
Contributor

valadas commented Aug 29, 2022

We just have one problem here, this was slated for 9.11.0 but got merged into develop.
It is probably not a big deal as we may release 9.11.0 soonish but if we need to do a 9.10.3 release, we will have to revert/correct this...

@bdukes
Copy link
Contributor

bdukes commented Aug 29, 2022

@valadas #5207 reverted this PR on develop and #5209 reapplied this PR on release/9.11.0, so we should be good.

@valadas
Copy link
Contributor

valadas commented Aug 29, 2022

Oh, sorry I missed that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Permission to Add Top-Level Pages
7 participants