Limited User can't Assign User on Permissions tab
This bug exists in 2.0 as well as 2.1
http://screencast.com/t/9CBzF35av0em
I gave a user full edit permissions over a structure, and complete permissions over a host
Then I logged in as that limited user and created a piece of content
I edited the content and looked at permissions tab to make sure my role had full permissions on the content... but was not able to add a user to the permissions tab on the content. Same happened on a form structure, container, etc.
Limited user, despite having full permissions over objects, can't add a user to the object. Adding Roles works fine however.
CMS Admins are able to add user permissions over objects just fine... this is limited users only.
This issue is a Show Stopper for the Secure Form project.
Ozzy noticed this error message returned by the ajax loading the users in the drop down:
The User being passed in doesn't have permission to requested User Object { javaClassName="com.dotmarketing.exception.DotSecurityException", message="The User being passed i...ssion to requested User"}
and then realized that in the method loadUserById in the class com.dotmarketing.business.UserAPIImpl, the getUserProxy method is not returning the permissions of the user to whom we were trying to grant permissions on the structure; therefore, the validation perAPI.doesUserHavePermission(upAPI.getUserProxy(u,APILocator.getUserAPI().getSystemUser(), false), PermissionAPI.PERMISSION_READ, user, respectFrontEndRoles)) always returns false.
We considered the option of switching from loadUserById(String userId, User user, boolean respectFrontEndRoles) to loadUserById(String userId), but we ended up creating a temporary hotfix patch that comments out the doesUserHavePermission validation to be able to continue the secure form QA tests while R&D defines the permanent fix.
Let me know if you want Ozzy to take a look at this with whomever you assign this task to.
Gabby
fixed on https://github.com/dotCMS/dotCMS/issues/801