Dannymh
Active member
I am building a system for a very specific use case where users attach to a parent account, kind of like employees of a business.
All posts have to be on behalf of the business account, and not the individuals, though some content is drawn from the profile of the employee, like name, phone number etc.
I don't want the individual users to have post permissions per-se and they can't impersonate the user. Rather what happens is that if the parent is set, it sets the post and thread user as the parent account.
Rather than completely re-write the permission checks for adding a new thread or the code that adds a new thread, I was wondering if there was a way to easily set a user permission on the fly and re-set it afterwards, kind of like session().
Basically I want to go
"If Parent, set canCreateThread for user x to yes" then change it back to no when the post is made.
Is there a better way to do this without explicitly granting the user the permission to post via usergroup?
All posts have to be on behalf of the business account, and not the individuals, though some content is drawn from the profile of the employee, like name, phone number etc.
I don't want the individual users to have post permissions per-se and they can't impersonate the user. Rather what happens is that if the parent is set, it sets the post and thread user as the parent account.
Rather than completely re-write the permission checks for adding a new thread or the code that adds a new thread, I was wondering if there was a way to easily set a user permission on the fly and re-set it afterwards, kind of like session().
Basically I want to go
"If Parent, set canCreateThread for user x to yes" then change it back to no when the post is made.
Is there a better way to do this without explicitly granting the user the permission to post via usergroup?