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

Ability to hide folders on predicate. #113

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Antoshjkee
Copy link

@Antoshjkee Antoshjkee commented Jun 11, 2019

Based on my question #111
Since change is so small, I have implemented the change before getting a reply.

Overall:
The current feature allows hiding folders on a predicate during the config setup.

Example:

    treeConfig.AddFolder("Folder", folderConfig =>
    {
        folderConfig.HideFromTree(() =>
        {
            var currentUser = UmbracoContext.Current.Security.CurrentUser;
            if (currentUser == null) return false;
            return currentUser.IsAdmin();
        });

        // ... 
    }    

@mattbrailsford
Copy link
Owner

Hey @Antoshjkee, thanks for submitting a PR. I'm currently away ATM, back next week, so will review properly then, but initial thought on the idea is that it's s good one.

Will come back with more in a few days.

Many thanks

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

Successfully merging this pull request may close these issues.

2 participants