[OzzModz] Attachment Constraints Permissions

[OzzModz] Attachment Constraints Permissions [Paid] 2.0.1

No permission to buy ($15.00)
Suggestion #1: Wouldn't it be a good idea to display also the pixel size restriction for that usergroup next to the KB display right hand of the upload field ?

And the suggestion to add the option to restrict on a weekly basis the number of uploads, because some users are throwing hundreds of images at a forum. Due to this other's images do not get enough attention.

Restrictions on disk space or per message do not help here, because these people will just shrink their KB per image and continue as before with several messages. It is the attention to other's images I want to rescue by not showing too many images of one user only at the same time period.

@Painbaker will answer as soon as possible.
 
I detected another issue, while analyzing the forum permissions.

I have for moderators certain settings for image uploads etc. For all subforums the same settings.

Now I want to have for one specific subforum a different setting, with lower pixel size and lower KB size. I made these changes in the subforum permissions for the moderator usergroup and a "group 20" which they are also part of.

When I go within XF/ACP/usergroup/analyse forum permissions, it shows the correct sizes for that subforum. See screenshot. red =general permission, green = how it should be for that subforum only.

Analyze_forum_permissions.webp

If I go now to the subforum and try to upload an image, it shows me the wrong value. It shows 2MB file size instead of 500KB.

challenge_subforum_wrong_KB_size.webp

And the moderator is able to upload images that are too big for that subforum, although I made for that subforum different settings and he should not be able to upload bigger sizes than 500KB
 
@Ozzy47 @Painbaker

Another issue/question regarding media gallery.

I installed your addon now on a different forum, which has also the official XF Mediagallery installed. I found out, that the settings of your addon do not display in the ACP options for XFMG. Did I do something wrong or does it only work for XF, but not for MG?

If it is not yet developed for working also with MG, would it be possible to broaden your addon to enable the same restrictions per usergroup in MG as with your addon in XF?

If yes, please make sure that the restrictions are also in the MG ACP/options for your addon

in KB, not in MB as it is with the normal options in MG per default settings (see screenshot)

XF_attachments_max_file_sizeKB.webp



XF_media_gallery_max_file_size.webp
 
Last edited:
Hi,

@Ozzy47 @Painbaker

I found another bug beside the problem showed in my posting #42 (https://xenforo.com/community/threa...straints-permissions-paid.186945/post-1679889)
My guess is that this is the other side of the same bug.

In XF ACP I can set limits for attachments in the usergroup settings (in the usergroup section "general permissions" and in section "forum permissions") and in the node permissions for each specific node (if I want to).

The way XF normally works is that you set the permissions for the different usergroups and this applies then for the whole board, no matter in which node. Only if you want to have a different setting for a specific usergroup in a specific node, you use the "node permissions" in XF ACP to do this.

This does not work in your addon version 2.01

Here are screenshots from XF/ACP/usergroup permissions for both sections:

OzzModz_attachement_contraints_UG_permissions_general.webp

OzzModz_attachement_contraints_UG_permissions_forum.webp

Both numbers are set for a premium usergroup.

The node permissions for a specific node for that premium usergroup are set to "inherit":

OzzModz_attachement_contraints_node_permissions.webp

As far as I understand the XF permission settings, "inherit" means it shall apply the numbers done in the broader usergroup permission settings shown in the first 2 screenshots above.

But this is not the case at the moment in version 2.01. It applies the non-premium usergroup settings instead and premium members can not upload bigger images in that node. I do not know whether it takes atm the numbers from the "registered usergroup" or from the general "attachments settings of XF/ACP/options/attachments.

Forgot to mention: The fall back option to "general permissions" is checked in ACP/addons/options.

OzzModz_attachement_contraints_fallback_to_general.webp

If you have many nodes, it would be a nightmare to change the settings first on 2 different locations within the usergroup permissions for 6 different usergroups and then to go to nodes permissions of every single node and change there again one by one for 6 different usergroups the settings there too.
 
Last edited:
I detected another issue, while analyzing the forum permissions.

I have for moderators certain settings for image uploads etc. For all subforums the same settings.

Now I want to have for one specific subforum a different setting, with lower pixel size and lower KB size. I made these changes in the subforum permissions for the moderator usergroup and a "group 20" which they are also part of.

When I go within XF/ACP/usergroup/analyse forum permissions, it shows the correct sizes for that subforum. See screenshot. red =general permission, green = how it should be for that subforum only.

View attachment 301982

If I go now to the subforum and try to upload an image, it shows me the wrong value. It shows 2MB file size instead of 500KB.

View attachment 301983

And the moderator is able to upload images that are too big for that subforum, although I made for that subforum different settings and he should not be able to upload bigger sizes than 500KB
It's not a bug.
XF by default builds integer permissions by ascending priority (always returns the highest value possible in the permission inheritance tree including secondary groups). In your case global permissions are higher than node permissions.

I'll take a look at what I can do about this.


As far as I understand the XF permission settings, "inherit" means it shall apply the numbers done in the broader usergroup permission settings shown in the first 2 screenshots above.

But this is not the case at the moment in version 2.01. It applies the non-premium usergroup settings instead and premium members can not upload bigger images in that node. I do not know whether it takes atm the numbers from the "registered usergroup" or from the general "attachments settings of XF/ACP/options/attachments.

Forgot to mention: The fall back option to "general permissions" is checked in ACP/addons/options.

OzzModz_attachement_contraints_fallback_to_general.webp
What does the permission analysis tool show for this group in this node?

The fallback option means that if the user has no content-related permissions (or set to zero), the add-on will return the limits from the “General” permissions if they are set

1715513790736.webp

Another issue/question regarding media gallery.

I installed your addon now on a different forum, which has also the official XF Mediagallery installed. I found out, that the settings of your addon do not display in the ACP options for XFMG. Did I do something wrong or does it only work for XF, but not for MG?

If it is not yet developed for working also with MG, would it be possible to broaden your addon to enable the same restrictions per usergroup in MG as with your addon in XF?

If yes, please make sure that the restrictions are also in the MG ACP/options for your addon

in KB, not in MB as it is with the normal options in MG per default settings (see screenshot)
This add-on does not affect XFMG limits
It would be weird if there were two permissions with different units, but I'll take a look at what I can do about it.
 
Please forgt my posting #44. I just found out with the testings, that the user just cancelled the premium membership. No wonder that he can not use the bigger sizes anymore :)

Sorry for that confusion. 😵‍💫

So, back to the other questions:


...always returns the highest value possible in the permission inheritance tree including secondary groups). In your case global permissions are higher than node permissions.

For the different user groups yes, but as soon as I limit even more on a node permission level, the node has to have the higher priority.

This is like "finetuning" the permissions. On the usergroup level you have the broader settings for the whole board. On the node permissions level you have the finetuning to adjust in even more granular steps the permissions of that usergroup. It works that way within XF settings without addons as far as I can remember.

It seems that version 2.01 ignores the finetuned settings of the node permissions as if they were not made at all.

See here the outcome, if I do nothig at all for that usergroup level in the node-permission-section. Everything is fine as it should be:

OzzModz_attachement_contraints_analyse_permissions_no_settings.webp




But if I change something in the node permission level for a subforum for that premium usergroup, it does not change anything in reality. The new settings are ignored:

OzzModz_attachement_contraints_analyse_permissions1.webp




I'll take a look at what I can do about this.

Thanks


Regarding usergroup settings and MG:

This add-on does not affect XFMG limits
It would be weird if there were two permissions with different units, but I'll take a look at what I can do about it.

Yes and as it seems at the moment, your addon version 2.01 works correctly in this way as of today.

The reason why it was not working 12 days ago was because of a different bug within MG itself. I got in the meantime a hack for a MG bugfix and now the settings of your addon work correctly also in MG. This was not the fault of your addon.

So, the only issue left is that of the finetuning via node permissions as described above.
 
Top Bottom