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

User must have View permission on default Site to edit on other Sites - v5.x #17612

Closed
craigWagner99 opened this issue Nov 13, 2019 · 17 comments
Closed

Comments

@craigWagner99
Copy link

Describe the bug

User must have at least View permissions on the default site or they can not edit content on any other host.

Even if the page/template/container/contentlet/workflow/etc. have proper permissions.

Steps to reproduce the behavior:

  1. add new site
  2. add new Role and User
  3. Permission Role to be able to edit pages on new site
  4. Create new Page Content Type / content / Container / Template and grand permissions to new role
  5. Add a Workflow to CT and CT contentlet
  6. Add Role to Workflow
  7. Create new folder
  8. Create new page in the folder

Expected behavior

Role should have permissions to create / edit pages.

Actual Behavior

User cannot - Access Denied Error

Workaround

Adding at least "View" permission to the default site allows editing.

Screen Recording reviewing entire issue:

https://drive.google.com/open?id=1G_CP9tXy9Czl0z3Sik2aNbm_MeNRxQF1

Desktop (please complete the following information):

  • OS: n/a
  • Browser chrome/FF
  • Recreated on demo version - 5.2.1
@wezell wezell added this to the Bugs milestone Nov 15, 2019
@wezell wezell modified the milestones: Bugs, Scout Current Nov 19, 2019
@jgambarios jgambarios modified the milestones: 5.2.2_021219_SCOUT, Scout Backlog, Bugs Dec 3, 2019
@freddyucv freddyucv self-assigned this Dec 19, 2019
@freddyucv
Copy link

PR #17759

@wezell
Copy link
Contributor

wezell commented Jan 1, 2020

This change has performance problems as it forces an index lookup for every host lookup. I think we need a 404 cache on it.

Screen Shot 2019-12-31 at 1 10 31 PM

wezell added a commit that referenced this issue Jan 2, 2020
@wezell wezell modified the milestones: Bug Sprint, Falcon Current Jan 8, 2020
freddyucv pushed a commit that referenced this issue Jan 13, 2020
@freddyucv
Copy link

PR: #17832

dsilvam pushed a commit that referenced this issue Jan 14, 2020
* #17612 Fixing performance problems

* refactoring

* refactoring
@nollymar nollymar self-assigned this Jan 14, 2020
@nollymar
Copy link
Contributor

Tests Results: Success

@nollymar nollymar removed their assignment Jan 15, 2020
jgambarios pushed a commit that referenced this issue Jan 15, 2020
* #17612 Fixing performance problems

* refactoring

* refactoring

(cherry picked from commit f710c6b)
@bryanboza
Copy link
Member

bryanboza commented Jan 21, 2020

After this fix, we still with a couple of problems navigating in other sites:

If you add full permissions to handle the new site to this role.

@wezell
Copy link
Contributor

wezell commented Jan 21, 2020

@bryanboza only CMS Admins can manage users.
I think the other issues are all new cards.

@bryanboza
Copy link
Member

@wezell , After this fix we don't have the error if you try to edit an existing page, but if you try the steps provided by the client

1. add new site
2. add new Role and User
3. Permission Role to be able to edit pages on new site
4. Create new Page Content Type / content / Container / Template and grand permissions to new role
5. Add a Workflow to CT and CT contentlet
6. Add Role to Workflow
7. Create new folder
8. Create new page in the folder

We can't do that since you are unable to add a new page, because you don't have available workflow actions, I reported this on the #17876 .

In the main description of the bug they are talking about add//edit pages, this why I send this card back...

@freddyucv
Copy link

You can do that if you add permission to "Edit content" for all sites, this is a bug but is another issue

@bryanboza
Copy link
Member

Yes @freddyucv in this case when you add permissions to All Sites this includes the default one, that's why now it is working. But don't make sense need to add permissions to all sites, we need be able to handle this individually

@dsilvam
Copy link
Contributor

dsilvam commented Jan 23, 2020

Originally commented by @wezell:

@freddyucv @dsilvam this fix is still hitting elasticsearch every request:

ab -c 10 -n 10000 http://localhost:8080/about-us/index

Screen Shot 2020-01-22 at 8 02 58 PM

@wezell
Copy link
Contributor

wezell commented Jan 23, 2020

@dsilvam is Freddy's fix making it into 5.2.4? It should I believe

@dsilvam
Copy link
Contributor

dsilvam commented Jan 23, 2020

yes 5.2.4 @wezell

@dsilvam
Copy link
Contributor

dsilvam commented Jan 23, 2020

Passed Internal QA: HostAPIImpl.resolveHostName is not showing anymore in the profiling via glowroot when performing
ab -c 10 -n 10000 http://localhost:8080/about-us/index

@freddyucv
Copy link

PR: #17892

@bryanboza
Copy link
Member

Fixed, tested the performance problems after the last fix, and now we don't have calls to that method

Tested starting dotCMS in profile mode and tracking the ab request with Glowroot.
SC: https://content.screencast.com/users/Bryan_Boza/folders/Snagit/media/9cb13fa8-8029-4e46-8924-d34e8fccb5a2/2020-01-24_14-52-53.png

Tested on release-5.2.4 // Postgres

@wezell wezell closed this as completed Jan 29, 2020
@bryanboza
Copy link
Member

All the new bugs on this card was moved to separate cards, here the references:
#17612 (comment)

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

7 participants