Coder Social home page Coder Social logo

admin-security-bundle's People

Contributors

bartekgruszka avatar chives avatar jarekw avatar norberttech avatar rn0 avatar sum-projects avatar szymach avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

admin-security-bundle's Issues

Do not display status - specific errors in forms

Currently, if an disabled or locked user tries to log in or reset his password, he will receive a message containing information on his current status in the form errors. This should not happen, since it makes it possible to discover which users exist in the database.

[Insight] Source code should not contain TODO comments

in features/fixtures/project/src/FSi/FixturesBundle/Admin/PageSettings.php, line 43

TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

        return 'Page settings';
    }

    protected function initDataGrid(DataGridFactoryInterface $factory)
    {
        // TODO: Implement initDataGrid() method.
    }

    protected function initDataSource(DataSourceFactoryInterface $factory)
    {
        // TODO: Implement initDataSource() method.

Posted from SensioLabsInsight

Assert user's repository implements bundles interface

There is an assumption in the change password command that the user entity will use the repository provided by admin security bundle, which may not always be the case. I think that it would be better to create a container repository with a dependency on user's repository, that would use the known methods. That way we aren't limited by actions of end-user.

EnforcePasswordChangeListener priority

EnforcePasswordChangeListener redirects user to password change page, but it is invoked after symfony's Firewall listener which has higher priority. When the user clicks on link to page which they don't have permission, access denied exception will be thrown before EnforcePasswordChangeListener run.

Simply changing priority is not enough. Before firewall starts we cannot use $authorizationChecker->isGranted() and we have no token. Maybe we can also listen for kernel.exception ?

User actions not working for chained entity provider

If you define a chain provider for login form with at least two entities not having the same table, only the class defined in the fsi_admin_security.model.user parameter will be checked against the provided credentials. Obviously this should be changed, so all defined entities will be checked against.

Example - ChangePasswordController.

Do not use deprecated AdvancedUserInterface

User Deprecated: The "FSiBundleAdminSecurityBundleSecurityUserUserInterface" interface extends "SymfonyComponentSecurityCoreUserAdvancedUserInterface" that is deprecated since Symfony 4.1

Do not remove element from manager when it's not allowed for current user

It should be rather omitted during (menu / actions / batch actions) generation than completely removed. Current implementation causes confusion during debugging. Another problematic use case is when list element is allowed but action or batch action should not be allowed. Then additional permission check is required before adding action or batch action to list's datagrid.

[Insight] Source code should not contain TODO comments

in features/fixtures/project/src/FSi/FixturesBundle/Admin/News.php, line 48

TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

        // TODO: Implement initDataGrid() method.
    }

    protected function initDataSource(DataSourceFactoryInterface $factory)
    {
        // TODO: Implement initDataSource() method.
    }

    protected function initForm(FormFactoryInterface $factory, $data = null)
    {
        // TODO: Implement initForm() method.

Posted from SensioLabsInsight

Update project description

Currently:

"Purpose of this bundle is to provide simple authentication & authorization mechanisms for fsi/admin-bundle"

It should say:

"Purpose of this bundle is to provide simple authentication & authorization mechanisms for fsi-open/admin-bundle"

Notice the fsi-open in fsi-open/admin-bundle

SecuredElement access exception

When the user enters a element to which it don't have permission (because of SecuredElementInterface), AccessDeniedException or similar should be thrown instead of current NotFoundHttpException.
There is no easy way to distinguish between those 2 situations currently

[Insight] Source code should not contain TODO comments

in features/fixtures/project/src/FSi/FixturesBundle/Admin/PageSettings.php, line 48

TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

        // TODO: Implement initDataGrid() method.
    }

    protected function initDataSource(DataSourceFactoryInterface $factory)
    {
        // TODO: Implement initDataSource() method.
    }

    protected function initForm(FormFactoryInterface $factory, $data = null)
    {
        // TODO: Implement initForm() method.

Posted from SensioLabsInsight

[Insight] Source code should not contain TODO comments

in features/fixtures/project/src/FSi/FixturesBundle/Admin/News.php, line 43

TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

        return 'News';
    }

    protected function initDataGrid(DataGridFactoryInterface $factory)
    {
        // TODO: Implement initDataGrid() method.
    }

    protected function initDataSource(DataSourceFactoryInterface $factory)
    {
        // TODO: Implement initDataSource() method.

Posted from SensioLabsInsight

Features to be logged into CHANGELOG / UPGRADE

  • Removal of dependency on FOSUserBundle.
  • Added default administration element for managing users.
  • Added email activation.
  • Changed translation domain for messages displayed on login form page (#84).
  • Changed routes for activation password reset actions (#93)
  • Added console commands for user actions.
  • Requirement of user model class repository to implement bundles' interface.
  • The fact, that during user creation username is begin overwritten by a listener

Refactor password resetting

Currently, if I understand correctly, when a user requests a password change, the token is being created only for existing users. So if you send a request for the same email twice, you will know if the current user exists in the database. That happens because you will receive a message about a token being already generated for this email only if the user exists. Perhaps we could create a password reset token regardless of user existence and make the user - token relation optional?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.