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

[Templates] Limited user cannot get list of Containers it has access to. #14134

Closed
joseorsini opened this issue Apr 16, 2018 · 6 comments
Closed

Comments

@joseorsini
Copy link
Contributor

joseorsini commented Apr 16, 2018

Expected Behavior

Limited users, even if they have full permissions, should have access to all Templates/Containers once a Page is created, or a Template is edited and wants to add a new container to it.

Current Behavior

Any non-admin user with full grants over a Site (including Publish permissions for all assets) cannot retrieve the list of Containers it has access to because of a bug in the system.

Steps to Reproduce (for bugs)

  1. Go to Roles portlet. Select Contributor Role
  2. Assign Add To/Edit/Publish permissions to all assets.
  3. Assign Templates and Containers as available layouts/portlets for this user. This can be made on Role's "Tabs" section.
  4. Login As Joe Contributor.
  5. Go to Templates portlet.
  6. Select and template and edit it.
  7. Click on "Add Container" button. Dropdown shows as empty.

Stacktrace:

https://gist.github.com/joseorsini/ef4d83d65afd679ae9e74d046cc3aefa

Context

Reported by customer:
https://dotcms.zendesk.com/agent/tickets/95579

Your Environment

  • dotCMS version used: 4.3.2, master.
  • Browser Name and version: Any Browser.
  • Operating System and version: Any supported OS.
  • Application Server and version: Any supported application server.
  • Java Brand and version: Any supported Java version.
  • Database and version: Microsoft SQL Server 2016.
  • Application module (if apply): N/A.

Acceptance Criteria:

  • Need to be tested in 4 DBs
@joseorsini
Copy link
Contributor Author

PR: #14138

jtesser pushed a commit that referenced this issue Apr 17, 2018
dsilvam pushed a commit that referenced this issue Apr 24, 2018
@dsilvam dsilvam added the Merged label Apr 24, 2018
@dsilvam dsilvam added this to the Rex Current milestone Apr 24, 2018
@dsilvam dsilvam modified the milestones: 5.0_050118_REX, Rex Current May 1, 2018
@DeanGonzalez
Copy link

DeanGonzalez commented May 1, 2018

I just tested on Postgres and Template list opens extremely slow for a limited user... canceling a template takes a long time. And at first, the containers did not show up at all. Then later after several logins, they started appearing. In mysql, even after several attempts, I could not get container list to load and experience the same extremely slow behavior. I also got several javascript errors on the page:

image
No errors in the log though

@joseorsini
Copy link
Contributor Author

@DeanGonzalez I had the same behavior too while I was doing some tests. Thought it was something related to my local, but indeed seems to be a performance related issue.

@nollymar nollymar self-assigned this May 3, 2018
@nollymar nollymar closed this as completed May 3, 2018
@nollymar nollymar reopened this May 3, 2018
nollymar added a commit that referenced this issue May 7, 2018
…itedUser by TemplateAPI#findTemplatesUserCanUse
nollymar added a commit that referenced this issue May 7, 2018
…mitedUser by ContainerFactory#findContainers
nollymar added a commit that referenced this issue May 7, 2018
@nollymar
Copy link
Contributor

nollymar commented May 7, 2018

PR Core: #14315
With this PR, the following functionalities need to be tested using limited users:

  • Create/Edit a template: Listing containers should work fine
  • Create/Edit a page asset: Listing templates should work fine
  • Create/Edit a folder: Listing allowed content types should work fine

Known issue: There is a performance issue listing templates: #14316

@nollymar nollymar removed their assignment May 7, 2018
dsilvam pushed a commit that referenced this issue May 7, 2018
…as access to (#14315)

* #14134 Replacing call to PermissionedWebAssetUtil#findTemplatesForLimitedUser by TemplateAPI#findTemplatesUserCanUse

* #14134 Replacing call to PermissionedWebAssetUtil#findContainersForLimitedUser by ContainerFactory#findContainers

* #14134 Removing unused imports
dsilvam added a commit that referenced this issue May 8, 2018
dsilvam added a commit that referenced this issue May 8, 2018
dsilvam added a commit that referenced this issue May 8, 2018
* #14134 Restore lost filtering ability

* #13134 Add Integration test for filtering

* #14134 clean up not needed layout variable

* #14134 Final list.
@nollymar
Copy link
Contributor

nollymar commented May 8, 2018

PermissionedWebAssetUtil.java has been removed here: #14344

Please @john-thomas-dotcms @DeanGonzalez consider this for changelog

@nollymar nollymar removed their assignment May 8, 2018
dsilvam pushed a commit that referenced this issue May 8, 2018
…as access to (#14344)

* #14134 Replacing call to PermissionedWebAssetUtil#findTemplatesForLimitedUser by TemplateAPI#findTemplatesUserCanUse

* #14134 Replacing call to PermissionedWebAssetUtil#findContainersForLimitedUser by ContainerFactory#findContainers

* #14134 Removing unused imports

* #14134 Removing PermissionedWebAssetUtil class
@bryanboza
Copy link
Member

Fixed, tested in the last master and now we are able to use it as limited user

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

No branches or pull requests

8 participants