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

Module permissions lost when using "Place existing Module" #5633

Open
1 of 3 tasks
Timo-Breumelhof opened this issue Apr 28, 2023 · 1 comment · May be fixed by #6459
Open
1 of 3 tasks

Module permissions lost when using "Place existing Module" #5633

Timo-Breumelhof opened this issue Apr 28, 2023 · 1 comment · May be fixed by #6459

Comments

@Timo-Breumelhof
Copy link
Contributor

Timo-Breumelhof commented Apr 28, 2023

Description of bug

When you place an existing module that has the checkbox "Inherit View permissions from Page" turned off, you end up with a module without any permissions

Steps to reproduce

List the precise steps to reproduce the bug:
As Host;

  1. Create 2 pages
  2. Place the HTML module on page 1
  3. Open the module settings > Permissions
  4. uncheck [ ]Inherit View permissions from Page
  5. Set view and edit rights for Registered Users
  6. Open the second page
  7. Choose > Add existing module (make copy)

Current behavior

When opening the module permissions for the copied module you will see that the right for "Registered Users" were not copied. Also the module is not visible to administrators.
This is due to the fact that there are no records for the module in the ModulePermissions Table.
SELECT * FROM vw_ModulePermissions where ModuleId = [moduleid]

gives back no records

If you set the Permissions for the module after you copied it, they do get saved to the ModulePermissions Table and the module is visible to Admins again.

Expected behavior

Permissions of the original module should be copied to the new module

Affected version

  • 10.00.00 alpha build
  • 09.11.02 release candidate
  • 09.11.01 latest supported release
@Timo-Breumelhof
Copy link
Contributor Author

Timo-Breumelhof commented Mar 13, 2025

First search, looks like this

modulePermissions = this.modulePermissions,

is missing in clone module:

schotman added a commit to schotman/Dnn.Platform that referenced this issue Mar 20, 2025
When a user with edit rights (aka admin, NOT host) copies an existing module that has "inherit permissions" unchecked, no permissions are saved for the new module. 

For the admin user the module "vanishes" from the page (seems to be not added). However the host user still sees the module.



fix issue dnnsoftware#5633
schotman added a commit to schotman/Dnn.Platform that referenced this issue Mar 20, 2025
When a user with edit rights (aka admin, NOT host) copies an existing module that has "inherit permissions" unchecked, no permissions are saved for the new module.

For the admin user the module "vanishes" from the page (seems to be not added). However the host user still sees the module.

line 957

fix issue dnnsoftware#5633
schotman added a commit to schotman/Dnn.Platform that referenced this issue Mar 20, 2025
When a user with edit rights (aka admin, NOT host) copies an existing module that has "inherit permissions" unchecked, no permissions are saved for the new module.

For the admin user the module "vanishes" from the page (seems to be not added). However the host user still sees the module.

line 688

fix issue dnnsoftware#5633
schotman added a commit to schotman/Dnn.Platform that referenced this issue Mar 20, 2025
When a user with edit rights (aka admin, NOT host) copies an existing module that has "inherit permissions" unchecked, no permissions are saved for the new module.

For the admin user the module "vanishes" from the page (seems to be not added). However the host user still sees the module.

line 688

fix issue dnnsoftware#5633
@valadas valadas added this to the Future: Patch milestone Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants