Open erickcomp opened 2 years ago
Hi @erickcomp ,
Thank you for this and your pull request. Could you please share the details of a sample scenario with me?
It tries to identify if you have a specified archetype. If you do, or you switched roles, or you are a site admin, it returns true. Otherwise false. This was done so that Site Administrators always end up returning true.
While I am not sure that I agree with your proposal. I think there is room for improvement here. Ideally, in my opinion, the code should be revised to include the following logic:
Looking forward to your thoughts and example on this.
Best regards,
Michael
The method "hasonlyarchetype" used for {ifstudent} filter returns wrong result. After verifying that user has no other archetypes, code checks if user is site_admin, but it's returning true when user is_siteadmin and false otherwise. It should be the opposite of it.