×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
ACL
Ryan
New Member
Posts: 7
7 года 2 мес. назад #1638
от Ryan
Ryan создал тему: ACL
I can't seem to find information about the feature.
Add ACL Control to each individual item. (granular access)
I would like to implement this into my component, by recording a joomla_id in the table who can access and edit the record (not the created by) can anyone point me in the right direction. I'm familiar with MVC. I've noticed that the component creator creates a canEdit helper method. How can I leverage this to allow editing of a record in my table for the specified joomla user.
In my example data will be input by a user(created_by) and then assigned to an individual manager (joomla_id) to access and keep up to date the record(id). Like an assigned user managing another users profile. (think of a doctor managing records of patients who are his but not created by him) The joomla_id field will store only 1 integer. Can I create a state like the edit.own state. ??
What would be the "best" way to achieve this following your component builder MVC structure?
Add ACL Control to each individual item. (granular access)
I would like to implement this into my component, by recording a joomla_id in the table who can access and edit the record (not the created by) can anyone point me in the right direction. I'm familiar with MVC. I've noticed that the component creator creates a canEdit helper method. How can I leverage this to allow editing of a record in my table for the specified joomla user.
In my example data will be input by a user(created_by) and then assigned to an individual manager (joomla_id) to access and keep up to date the record(id). Like an assigned user managing another users profile. (think of a doctor managing records of patients who are his but not created by him) The joomla_id field will store only 1 integer. Can I create a state like the edit.own state. ??
What would be the "best" way to achieve this following your component builder MVC structure?
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Ryan
New Member
Posts: 7
7 года 2 мес. назад #1641
от Ryan
Ryan ответил в теме ACL
I have noticed that I have the ACL working on the front end when both COM_COMPONENT.EDIT and COM_COMPONENT.EDITOWN are allowed.
Unfortunately I need only the COM_COMPONENT.EDIT.OWN. and not having both breaks the component when saving the form.
I have made sure the created_by record is correct and the buttons correctly show in the list view. (only edit the correct item not all).
When you click on the edit button the viewform shows correctly.
but when you click save, the save method in controller/viewform.php throws an exception with the code....
// Validate the posted data.
$form = $model->getForm();
if (!$form)
{
throw new Exception($model->getError(), 500);
}
500 - You are not authorised to view this resource.
var dump $form is FALSE
var dump $model->getForm(); Is full of JForm object.
now if i turn both COM_COMPONENT.EDIT and EDIT.OWN on, everything works fine.
Is there a way that I can limit to only the editing of the OWN records without having to open everything up?
Unfortunately I need only the COM_COMPONENT.EDIT.OWN. and not having both breaks the component when saving the form.
I have made sure the created_by record is correct and the buttons correctly show in the list view. (only edit the correct item not all).
When you click on the edit button the viewform shows correctly.
but when you click save, the save method in controller/viewform.php throws an exception with the code....
// Validate the posted data.
$form = $model->getForm();
if (!$form)
{
throw new Exception($model->getError(), 500);
}
500 - You are not authorised to view this resource.
var dump $form is FALSE
var dump $model->getForm(); Is full of JForm object.
now if i turn both COM_COMPONENT.EDIT and EDIT.OWN on, everything works fine.
Is there a way that I can limit to only the editing of the OWN records without having to open everything up?
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Juan Sánchez
New Member
Posts: 9
7 года 1 мес. назад #1644
от Juan Sánchez
Juan Sánchez ответил в теме ACL
Hi there,
It seems to be something wrong in the code in your component set up. Could you please submit us a ticket and provide more information about the affected component, table and field?
www.component-creator.com/en/help/contact
Thanks
It seems to be something wrong in the code in your component set up. Could you please submit us a ticket and provide more information about the affected component, table and field?
www.component-creator.com/en/help/contact
Thanks
Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.
Время создания страницы: 0.054 секунд