Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit Own #240

Open
korelogic opened this issue Jan 7, 2014 · 1 comment
Open

Edit Own #240

korelogic opened this issue Jan 7, 2014 · 1 comment

Comments

@korelogic
Copy link
Contributor

I've just hit some issues with authenticating events using "edit own".

I have 2 sections Member and Organisation. Each member has an organisation field linked to the name in the organisation section but when the member tries to update the organisation while set to 'edit own' it fails authentication.

After a quick look at the code it seems to only map the relationship one way. I'm thinking the solution would be something like this:

public function checkEventPermissions

SELECT `child_section_field_id`
FROM `tbl_sections_association`
WHERE 
(`parent_section_id` = ".extension_Members::getMembersSection()." AND `child_section_id` = ".$section_id." AND `parent_section_field_id` IN ('".implode("','", $field_ids)."'))
OR
(`parent_section_id` = ".$section_id." AND `child_section_id` = ".extension_Members::getMembersSection().")
@cremol
Copy link

cremol commented Apr 22, 2014

Not sure if this is a bug, but definitely like to see support for related sections.
Right now 'edit own' only seems to apply to members section directly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant