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

AuthElement to handle form submission #117

Closed
wants to merge 1 commit into from
Closed

Conversation

samco
Copy link

@samco samco commented Feb 28, 2015

One option for implementation of #14.

Implementors must define the model and primary key types, the form to bind the submitted primary key, a method to determine if the submission should be authorised and three methods to handle various outcomes of the form binding, model loading and authorisation. A different trait implementation is required for each combination of model type and authorisation rule.

I have assumed each model can be identified by a single primary key but have allowed the form to specify the name of the primary key element, its type and any validation rules that may be required.

Suggestions and improvements are welcome.

@gakuzzzz
Copy link
Member

Hi, thanks for sending proposal and PR.

However, this FormSubmissionAuthElement seems difficult to use with other non-POST Actions in the same controller.
And Form handling can not custom by Action.

We needs dynamic creation of Authority object from POST parameters.
so we still consider the better way.

@gakuzzzz gakuzzzz closed this Feb 28, 2015
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

Successfully merging this pull request may close these issues.

2 participants