Quote from noyzen on March 8, 2022, 5:41 pm
Hi!
I'm making a simple online shop for my cousin to get started with neoCms...
I could add smtp email data on setting, so users can reset password with email!
(but i dont know how to send password reset in my app there is no command for that in neoCms commands)
Anyway...
I need to limit some collection enteries to their owner only. for example i want a user see or edit or delete his own data from chat collection or orders collection but he/she should not see orders and chats from other people of course!
I found a code in cockpit cms forum, but i dont know if it works and its secure or not... (i tested it seems something wrong with that)
Add this code to "read section" of collection):
<?php
if ($context->user && $context->user['group'] != 'admin') {
$context->options['filter']['_by'] = $context->user['_id'];
}
I need limit some collections to their owner only (and +admin).
I wonder If you found a secure way to do that @luishp or @gaev
Thanks!
Hi!
I'm making a simple online shop for my cousin to get started with neoCms...
I could add smtp email data on setting, so users can reset password with email!
(but i dont know how to send password reset in my app there is no command for that in neoCms commands)
Anyway...
I need to limit some collection enteries to their owner only. for example i want a user see or edit or delete his own data from chat collection or orders collection but he/she should not see orders and chats from other people of course!
I found a code in cockpit cms forum, but i dont know if it works and its secure or not... (i tested it seems something wrong with that)
Add this code to "read section" of collection):
<?php
if ($context->user && $context->user['group'] != 'admin') {
$context->options['filter']['_by'] = $context->user['_id'];
}
I need limit some collections to their owner only (and +admin).
I wonder If you found a secure way to do that @luishp or @gaev
Thanks!