Closed rafaucau closed 3 years ago
canSeeUserDirectoryLink
is true
if you have fof.user-directory.view
permission AND the fof-user-directory-link
setting is turned on. It's defined here https://github.com/FriendsOfFlarum/user-directory/blob/master/src/PermissionBasedForumSettings.php#L25
What you're describing seems to be the correct behavior. You disable the link setting, the link boolean goes to false (?)
The whole purpose of this attribute is to control whether the link will be inserted.
If you need to know whether the user has access to the user directly, you could expose a new attribute that is only based on whether you have fof.user-directory.view
permission. It could be called just canSeeUserDirectory
.
Based on @clarkwinkelmann's recent comment, it's safe to say that this is part of the intended functionality of this extension. Clark also added a tidbit of how you can get around this; in hindsight, we will proceed with closing this issue.
I unchecked the
Add link on homepage for users able to see the directory
option to add a link to the User Directory elsewhere.And it wouldn't work. It turned out that after unchecking this option, the
canSeeUserDirectoryLink
attribute is false.This option should be independent of permissions.