Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

Re:Ticket #629, Fixed Module name too short in Controller/View for permissions #1232

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

disccomp
Copy link

@disccomp disccomp commented May 23, 2016

A quick fix to allow permission names to be the full 100 characters specified in the ticket.

@disccomp disccomp changed the title #629 Fixed Module name too short in Controller/View for permissions Re:Ticket #629, Fixed Module name too short in Controller/View for permissions May 23, 2016
@disccomp
Copy link
Author

As an aside, why does the controller re-specify validation rules when the correct rules already exist in the model?

@mwhitneysdsu
Copy link
Contributor

The answer to why the controller re-specifies the rules is most likely that the model was updated to include the rules but one or more references to the model was not. So, the controller can be updated to use:

$this->form_validation->set_rules($this->permission_model->get_validation_rules($type));

Then the view just has to be modified to allow 255 characters for the name field.

@mwhitneysdsu
Copy link
Contributor

mwhitneysdsu commented May 24, 2016

Actually, now that I look back at the original issue, changing the maximum length of the name in the form will just make the problem worse. The reported issue is caused by the generated description being longer than the description field permits, in part because the generated description includes the name.

...and looking into it further, the permission form should have no effect on the original issue, which is strictly related to the form in the module builder, since the descriptions of the permissions are generated by the builder, rather than input in the form.

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

Successfully merging this pull request may close these issues.

2 participants