Write API v3 - Changing category permissions
-
Hi,
I'm looking at doing some automation of the creation of "private" categories and modifying their permissions so a newly created group (creating both at the same time) can be given access to the category.
I notice there is a
PUT
to update a category (https://docs.nodebb.org/api/write/#tag/categories/paths/~1categories~1{cid}/put) but I can't see anything to do with permissions as part of the payload.Do we have a way of doing this with the v3 API?
-
@brophy I think what you're looking for is this
https://docs.nodebb.org/api/write/#tag/groups/paths/~1groups~1{slug}~1ownership~1{uid}/put
-
@pitaj Thanks for getting back to me. I don't think I explained myself properly.
Is there a way to modify permissions on a category via the API?
Basically, we want to create a group > create two categories (a public "root" category and a subcategory within it that is privately locked to the new group we create)
I know we can create the groups and categories via the API, just not seen anything related to category permissions.
Thanks.
-
@brophy oh woops yeah sorry I didn't fully read into that. I don't see a way right now, I suggest opening an issue on GitHub requesting this.
Or if you need it right now, you could create a plugin to expose an API to do what you want.