dreamfactorysoftware / df-core

The DreamFactory Core services and resources.
Apache License 2.0
14 stars 32 forks source link

Allow to add middleware and allow admin roles #40

Closed yaroslavmo closed 5 years ago

yaroslavmo commented 5 years ago

@yaroslavmo I can see a lot of new functionality added to src/Models/AdminUser.php Since all this functionality is specific to Restricted Admin feature it makes sense to research on how to simply extract it into a separate class in a separate file.

@OlegLazaryev I must have confused you. I had restrictedAdminRoleCreator class which had all logic related to restricted admins -> after I added update functionality I renamed it to restrictedAdminController because it then wasn't only creating restrictedAdmin's roles but also updating them -> after review we agreed that this logic should not belong to the Controller but to the Model -> I got rid of it -> and now, as I understand, we're coming back to this approach? But how to call this class then?

OlegLazaryev commented 5 years ago

@yaroslavmo I can see a lot of new functionality added to src/Models/AdminUser.php Since all this functionality is specific to Restricted Admin feature it makes sense to research on how to simply extract it into a separate class in a separate file.

@OlegLazaryev I must have confused you. I had restrictedAdminRoleCreator class which had all logic related to restricted admins -> after I added update functionality I renamed it to restrictedAdminController because it then wasn't only creating restrictedAdmin's roles but also updating them -> after review we agreed that this logic should not belong to the Controller but to the Model -> I got rid of it -> and now, as I understand, we're coming back to this approach? But how to call this class then?

Yeah, you are correct. I was confused by the naming Controller.

yaroslavmo commented 5 years ago

Deprecated. Already in master