Re: Permissions to create category except for Admin user
I found this permission is only for admin.
If we want all users can create categories, is that possible
Chris
@djensen47 hey there! It could be because category watch state is now able to be set globally!
Give that a spin and see if that's what you originally wanted
That script is no longer compatible with latest the set names changed.
@julian said in Category watch/ignore set default for all users?:
@djensen47 hey there! It could be because category watch state is now able to be set globally!
Give that a spin and see if that's what you originally wanted
Yeah, awesome, this is exactly what we wanted.
@julian I can't seem to find the setting. Where do I change the global default? Is this feature on 1.12 or master?
Here it is, I knew I wasn't crazy
@julian Okay, thanks. I misinterpreted the the settings. I thought this was a per category global setting. This is a global all categories setting.
What I need is to set the default for about 5 or our categories to "Ignored" and "Watch" for the rest.
@baris said in Category watch/ignore set default for all users?:
That script is no longer compatible with latest the set names changed.
What are the new names?
@djensen47 cid:<cid>:ignorers
and uid:<uid>:ignored:cids
got removed there is a single set cid:<cid>:uid:watch:state
@baris So the _key
is as you described, the value
is the user id, and the score
is the watch state?
So I can't just write these records, I need to check for existing, handle that and continue.
Sorry, I'm trying to follow but I'm just not understanding how the database model works. I try digging into the code and go to db.sortedSetsAdd to see what that actually does but there's no docs so I read some more code and it adds a records but I'm not understanding what it means and why. I'm stuck now but I'll figure it out eventually. Thanks.
@djensen47 said in Category watch/ignore set default for all users?:
@baris So the _key is as you described, the value is the user id, and the score is the watch state?
That's correct, and the records do not exist until a user explicitly changes the setting on the category page. Until they change it the default from the ACP is used.
There are 3 possible values. https://github.com/NodeBB/NodeBB/blob/master/src/categories/watch.js#L9