Fixed "Add media to... A site category" checked if usergroup doesn't have permission

51463

Well-known member
im not sure if this is a bug, but...

I disabled regular registered members from uploading media in the Categories unless they are in a special usergroup. But they are allowed to upload albums.

But when they click on Add Media. They can still see the "Add media to... A site category" and it is checked.

It should be faded out and not checked
OR
it should be hidden.


It doesn't really make sense to keep it checked if they don't have permission. It's a bit deceiving.

Or hide it completely.


In fact, in my case, albums should be the one checked



Currently:
Capture.webp


What should be:
Capture (1).webp


Thanks,
 
Last edited:
But when they click on Add Media. They can still see the "Add media to... A site category" and it is checked.
Are you sure they can? As a moderator you are likely to have the Override media privacy permission which also bypasses permissions for adding media too.

If it's not that, what Gallery version are you running?
 
Yes. I have made a test account as if i was a new user signing up and it still shows up. I can even click on the drop down menu and it shows the categories but i can't click on them i can also see the search bar inside.
I also tried on my test board and same thing.

I am using 1.0.6 on my real forum
I am using 1.0.4 my test forum
 
There's got to be something wrong with your permissions.

If the permissions do not allow adding media to categories then the category selection won't appear, in my testing.
 
hmm.. strange

I'll have a look in the permissions again and make a fresh test board and see how that goes.
 
If the permissions do not allow adding media to categories then the category selection won't appear, in my testing.

Permissions are set to not allow adding media to categories, but they are allowed to view categories

Did you have the permissions to allow view category?


These are my permissions:

pic1
1.webp

pic2
2.webp


.
.
 
Thanks for looking into that again.

It definitely doesn't seem to be working as it's supposed to so I'll look into it.
 
Thanks, this is sorted now.

If there are no categories that can be added to then we will not show the category selector at all.
 
Back
Top Bottom