Add a property to disable mentions functionality
Opened this issue · 6 comments
In some cases, users are unable to search for others and mention them because of security restrictions. It would be nice to provide a way to disable the feature.
It is possible that I don't fully understand the request.
And correct me if I'm wrong, but I'm wondering if there isn't a good way to do this automatically, rather than forcing the client to know this information a priori. I.e. How would I as the user of the library actually know that this feature should be disabled. If anything, it seems like it could be automagical, I.e. if it doesn't work disable it, a posteriori, without the client consumer having special knowledge.
Last time I checked, the ability to use the search endpoint in COAM is based on a hardcoded configuration which is not exposed in any way. It would be awesome if this has changed since then.
In another component, we do "detect" this by faking a search and checking whether the current use "can" or "can't" search.
In another component, we do "detect" this by faking a search and checking whether the current use "can" or "can't" search.
Sounds great, any reason to not do it that way here?
We can. It seems like yet another workaround but we can do it. (it the other component, it was necessary as it was making a core feature "unavailable")
It seems to me that adding a prop to disable the feature is also valuable. There might be a lot of cases where people would not like to use this. So adding the additional calls to COAM to check whether they are allowed to seems unnecessary.
I suppose this is a different problem:
- How can I hide the friend search box on my website with the facebook icon
- How can I change the search box to only search for my friends
Do we actually want to remove the search call here, or do we want to have it work correctly for the right audience, perhaps the real issue is that search should always work and know who to be searching for...
Of course it would be awesome to have this work out of the box. The lack of this feature is causing a number of different issues, the biggest one - "I cannot grant access to users from my organization because I cannot find them". So we have self-service UIs that cannot be fully utilized because of this...
This ticket is to provide the users of this component with flexibility. It's not about adding restrictions or forbidding users to use certain features. The more control you have over the features the component provides, the higher is the satisfaction of its users (developers). And with great power comes great responsibility. There will always be a default setup for this component - if a users wants different behavior, it will be on him/her to configure it and bare the consequences.
How can I hide the friend search box on my website with the facebook icon
Assuming you use flexible enough component for this, you probably can ;)
How can I change the search box to only search for my friends
It would be awesome to solve this in the right place (COAM) and this question has been asked multiple times. I have not heard a plan for implementing this feature in near future. Happy to ask again ;)