Greetings,
I’m trying to limit who can post to a gallery based on who created the parent document.
I have a few issues going on here. First off, I’m using the example providing in the Wiki for getting one large image and thumbnails on a page.
And I’m using a separate document as an image manager.
I tried to use the &manager_webgroups as well as &manager_webusers parameters to limit who can upload but it seems to not work.
Is it possible to restrict upload/edit capabilities based on the user who created the parent document given this setup?
I should mention, I have a tiny snippet to pull the username of the author. I call that snippet within the MG call. My snippet seems to output the right name but MG doesn’t seem to function how I think it’s supposed to.
Grab Username:
global $modx;
$createdby = $modx->db->escape($createdid);
$res = $modx->db->select("username", "modx_manager_users","id=".$createdby."");
$cid = $modx->db->getValue($res);
echo $cid;
MG call:
[[MaxiGallery?
&galleryPictureTpl=`mgGalleryPicture`
&js=`mgJs` &debug=`0`
&manager_webusers=`[!UName? &createdid=`[*createdby*]`!]`
&manager_webgroups=`Bloggers`
&manage_target=`7`
!]
I’m not sure where to add the logic though for authentication since I’m using a separate document for an image manager.