Hi,
I know this is the Polish list, but I'm asking here because I get no replies on the English list. I hope this is okay.
I'm using the SMS service now, and it works great, but.... Using multiple users that have privilege over certain customergroups in LMS, I notice that indeed only the selected customergroup for that user is showing in the section "Messages". That works, however that user can also select "- all networks -" from that customergroups list and that shouldn't happen I think.
I want the user that I created in LMS to have ONLY privilege over the customergroups I selected for that user. Is that possible?
Does anyone have experience with the customergroups privileges for users (admins) in LMS? I don't know how to fix this. Thanks.
Best, Jelle
2013/11/9 Jelle jml@orkz.net
Hi,
I know this is the Polish list, but I'm asking here because I get no replies on the English list. I hope this is okay.
Hello there, yes there is low or no traffic on English groups. Feel free to ask here.
I want the user that I created in LMS to have ONLY privilege over the customergroups I selected for that user. Is that possible?
If i see it correctly:
"messageadd.php"
$recipients = $DB->GetAll('... [...] FROM customersview c [..] .($customergroup ? ' AND c.id IN (SELECT customerid FROM customerassignments WHERE customergroupid = '.intval($customergroup).')' : '') [...]
and:
CREATE VIEW customersview AS SELECT c.* FROM customers c WHERE NOT EXISTS ( SELECT 1 FROM customerassignments a JOIN excludedgroups e ON (a.customergroupid = e.customergroupid) WHERE e.userid = lms_current_user() AND a.customerid = c.id );
So, it should (at least - in pgsql, have little to none with current mysql development in lms) work as you have expected. If you could reproduce different behavior with some test data, then we should see.
Simply - the customerview - is a table with the customers only from 'allowed' groups for current logged user. And - data is taken from this table, as shown above. Second "WHERE" statement, selects groups, in case you have access to more groups, but want to send message only for some of them.
Best Regards,
uczestnicy (2)
-
Jelle
-
Krzysztof Drewicz