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

Setting entry ID #14

Open
DavidOliver opened this issue Apr 4, 2014 · 4 comments
Open

Setting entry ID #14

DavidOliver opened this issue Apr 4, 2014 · 4 comments

Comments

@DavidOliver
Copy link

Based on the readme and my having tried it, I understand that we can't set the entry ID with this extension.

You currently cannot set a default value for the ID of an Event due to a Symphony limitation.

How can we deal with someone changing the hidden id input value of a frontend form?

@michael-e
Copy link
Contributor

I think your answer is "permissions". A client should be able to edit entries based on permissions (e.g. "own", using the Members extension). If you do not have permissions of some kind in your app, you shouldn't allow frontend editing at all. You should think about the following (which in parts is beyond the scope of Default Event Values, of course):

  • Step 1: Lock owner
  • Step 2: Check event permissions
  • Step 3: Check entry permissions
  • Step 4: Add filter message to context (to display something useful in the frontend)

@michael-e
Copy link
Contributor

P.S.: When I said "don't allow editing", I literally mean "edit". "Create new" is s.th. different, of course.

@DavidOliver
Copy link
Author

Thanks. Would step 3 necessarily involve custom events?

How do you go about it in Members? I've noticed that, for example, entries that are associated with a member can only be edited by that member. Did you decide to assume that all SBLs from a section which point to a member indicate ownership?

@michael-e
Copy link
Contributor

Did you decide to assume that all SBLs from a section which point to a member indicate ownership

This is indeed the behaviour of Members, and I think it must be documented somewhere. But I don't know what happens if you have multiple SBLs pointing to a Members section, sorry.

So in most cases Members will also solve step 3 for you. If it does not, you will need an extension that hooks into the right delegates and performs the check for you. You can do that in en event, or hook into a delegate like the eventPreSaveFilter delegate.

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

2 participants