Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Russell Fox 4 posts 25 karma points
    Mar 17, 2016 @ 07:34
    Russell Fox
    0

    User does not have ability to publish even when publish permission is set (until app restart)

    I have a problem with a user that has Publish permissions on a node, but when creating an item there is initially no publish button available. This seems to be a caching issue, resolved by restarting the application pool, but this isn't really an option on a production system.

    I've managed to reproduce this error as follows:

    Create a new project, install Umbraco v7.4.1 via nuget. Create new Document Types - News and News Item. Enable List view on News and add News item as an allowed child node type for News.

    Add Site news under Content,.

    Under Users, Add a new User Type called newsEditor, make sure there are NO default permissions.

    Add a new User called Editor1, set the User Type to [newseditor]. edit Site News and add browse permission only.

    At this point I open a separate browser and log in as Editor1. You can browse to Site News (you can even create news item, although there is no create permission set) but cannot publish / save.

    Go to your initial session (where you're logged in as Admin) and edit the Site News Node and add all permissions for our Editor1.

    You should now be able to go back to the other session where you're logged in as Editor1 and create a news item, but the publish button still doesnt appear. Logging out doesn't change anything.

    If you added ALL permissions (including "Permissions") editor1 can now even edit the permissions on the Site news node, where you'll see all permissions as they were set.

    Restart the app pool and all starts working as expected, so I suspect this is an in-memory cache issue.

    Additional info -> The editor1 account needs to log in and have access to the Site News node before adding the other permissions for this issue to manifest. If you initially forget to add browse and log in, cannot see the site news node and add all permissions (including publish) from the admin account you can refresh to see site news, but then the publish button shows.

    Is there a way to properly clear the cache for site news (or what the app pool restart does) from the API?

    I have a package that helps manage user groups (not User Type) so I could call something, and have tried umbraco.library.RefreshContent(), but this doesn't help. I created the new site to ensure that something I'm doing in my user groups package wasn't causing the issue, so can confirm that this seems to be an Umbraco specific problem, with no additional packages installed. Running IIS 8.

    PS: I've logged this as an issue: http://issues.umbraco.org/issue/U4-8180

    Seems to relate to this: http://issues.umbraco.org/issue/U4-7934 and http://issues.umbraco.org/issue/U4-6973

Please Sign in or register to post replies

Write your reply to:

Draft