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

Code refactoring #51

Open
faboschert opened this issue Aug 28, 2015 · 5 comments
Open

Code refactoring #51

faboschert opened this issue Aug 28, 2015 · 5 comments
Milestone

Comments

@faboschert
Copy link
Collaborator

This issue is for collecting places in our code that can be optimized:

  • Redundant code:
    • some functions in LdapAdapter
    • error/warning/success messages in login.twig / base.twig
    • password validation in PasswordRecoveryControllerProvider.php / index.php
  • Code to split:
    • index.php
@leomelzer
Copy link
Collaborator

  • Properly abstract templates (see "login" and "base").
  • Modularize Javascript where it makes sense
  • Move index.php code to separate Controllers, as you suggested
  • Extract validation for $ownerPermission etc (see GuestControllerProvider.php) in before() middleware

@leomelzer leomelzer added this to the Next milestone Aug 31, 2015
@leomelzer
Copy link
Collaborator

Password validation is now somewhat shared in

private static function checkPasswordPolicy($password, $minLength = 8, $regex = '/[A-Za-z].*[0-9]|[0-9].*[A-Za-z]/')

leomelzer added a commit that referenced this issue Sep 3, 2015
Add method to notify owners of a given group about something via mail
The GroupControllerProvider can be used for refactoring the various
group-related actions in index.php, refs #51
Add required methods to LdapAdapter
@leomelzer
Copy link
Collaborator

@leomelzer
Copy link
Collaborator

Move generation of buttons (and possibly other reusable components) to Twig Macros

@leomelzer
Copy link
Collaborator

This is RE #27 (comment) but it better fits here:

I had the same thought yesterday – I think we should just pass UIDs or OUs to the LdapAdapter and it will figure out what to do with it, e.g. retrieving the full respective DN first. This better fits the traditional model of passing primary keys to some sort of database abstraction layer.

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