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

Current Status #399

Closed
rappasoft opened this issue Jun 28, 2016 · 38 comments
Closed

Current Status #399

rappasoft opened this issue Jun 28, 2016 · 38 comments
Assignees

Comments

@rappasoft
Copy link
Owner

I've obviously have had trouble finding time to work on this project, which sucks because I really enjoy this project.

My plan is to scrap v3 for now, and take all the work i've done and implement it in v2.

I'll probably make a legacy branch like I did for 5.1, because I plan on removing the CRUD screens for permission management, since there is no real world use for it, and instead just use a seed file for managing that.

I recently used the access part for a different project and it works well without it, theres never a need to update permission names on the go since they are hard coded into the backed code. Users/Roles management will remain the same.

I also had a lot of bug fixes in v3 I found, which i'll implement.

I believe I will need this boilerplate for a new project of my own soon, so I will have time to work on it in preparation for that.

Stay tuned and thanks for the ongoing support!

@poseso
Copy link
Contributor

poseso commented Jun 28, 2016

Thanks for this great project! I look forward to see those bug fixes and changes.. :)

@rappasoft
Copy link
Owner Author

Development branch is stable with the removal of permissions/dependencies views and functionality. So many classes and files removed, yet the same result and less to manage.

@rappasoft
Copy link
Owner Author

Also added a session timeout middleware that when enabled and given a value will auto log the user out after x seconds in inactivity.

@rappasoft
Copy link
Owner Author

Gonna literally go through every single line of code and clean it up as perfectly as I can, and throw in a few more surprise features before I release it and make it the new master. Stay tuned.

@rappasoft
Copy link
Owner Author

screencapture-l5boilerplate-dev-admin-access-users-1467434156446

Datatables are here.

@shinnlu
Copy link

shinnlu commented Jul 2, 2016

seems permission are hide somewhere

@rappasoft
Copy link
Owner Author

Permission management is gone. Only in seeders now.

Theres no reason to make permissions on the fly because they need to be hard coded at runtime to do anything. So now you just keep track easily in the seeder.

App still lets you attach them to roles and such.

@rappasoft
Copy link
Owner Author

I've made a modular history class that lets you log anything you want with a simple API:

screencapture-l5boilerplate-dev-admin-access-users-1467736961733

All default functionality will come out of the box as an example.

@rappasoft
Copy link
Owner Author

rappasoft commented Jul 5, 2016

Currently controlled with an event subscriber class per model to keep it neat, but you'll be able to call the global history() helper anywhere to log whatever you want.

You can display all history (global history), history per type (User, Role), history per entity (User id of 1).

Currently it supports up to 3 routes per history item if you wanted to link the items in the history text to their entities if they had show methods or something.

@digitalit
Copy link

When to you think the dev version is ok to upgrade to?
All my created permissions in my db wont be affected by the removal of the "on the fly part" regarding permissions they will work as they do now right?

@rappasoft
Copy link
Owner Author

They won't but I wasn't planning on people to upgrade to this version, it's a massive overhaul, but if you want to spend the time it shouldn't effect anything, there might be one or two database changes but the migrations shouldn't break what's there.

The permission stuff as of now is pretty solid, i'm just adding new features.

@digitalit
Copy link

ok, so you recommend waiting with updating the BP?

@rappasoft
Copy link
Owner Author

It would be wise, it's going to take you a long time if you want to go that route. It shouldn't be much longer before I release it as is because i'm running out of time to work on it before my new projects start again.

@digitalit
Copy link

ok, thank you so much. Still haven't found any project even close to yours :)

@rappasoft
Copy link
Owner Author

Thats good! I use this for the starting point of all of my projects. I'm adding features like history that I know I implement on all of my projects.

@egdavid
Copy link
Contributor

egdavid commented Jul 5, 2016

Any chance to add a "log-in as" button in the back-end so admins can use users accounts without knowing their credentials?

@rappasoft
Copy link
Owner Author

Like in spark? So you can see it as the user sees?

@egdavid
Copy link
Contributor

egdavid commented Jul 5, 2016

Yep exactly!
Did that on another project, I used the sessions to achieve it.

@rappasoft
Copy link
Owner Author

Example?

@egdavid
Copy link
Contributor

egdavid commented Jul 5, 2016

I don't have the code close but I did something like:

By pushing a button, the admin throws the following methods:
$request->session()->put('admin_userid', $user->id); // current user id is saved
Auth::loginUsingId($newuser->id); //targeted user id

And then we can display a floating button anywhere on the UI (frontend/backend) if the session exists:
@if (session()->has('admin_userid')) **You are logged in as $user->id, get back to your admin account:** @endif // that gets the admin back to his account

And if the admin wants to go back to his own account:
Auth::loginUsingId($request->session()->get('admin_userid'));

And then we destroy the saved session:
$request->session()->forget('admin_userid')

This could be useful for testing purpose or debugging in some cases.

@rappasoft
Copy link
Owner Author

screencapture-l5boilerplate-dev-1467752392879

@rappasoft
Copy link
Owner Author

@Arrakeen can you see if this looks pretty solid: d6dc33f

@egdavid
Copy link
Contributor

egdavid commented Jul 5, 2016

@rappasoft Yep! Users should probably create and attach a role/permission to this functionality to make it even more solid.

@rappasoft
Copy link
Owner Author

rappasoft commented Jul 5, 2016

It is, you need the manage-users permission to hit the loginAs route.

@rappasoft
Copy link
Owner Author

If anyone has a chance can they download and install the development branch and let me know what you think, play around, find bugs, etc.

Thanks!

@ninjaparade
Copy link
Contributor

ninjaparade commented Jul 5, 2016

@rappasoft that's awesome!

While you're in there, something I've added a few times and think it would be a good to have for frontend\auth\events is a UserConfirmedAccount event/event handler.

I also was wondering about the login/logout events, do you tend to add more data to those events other than just the user object being passed? as of laravel/framework#13704 the built in Session in Laravel that dispatches these events can be queued.

Just curious your thoughts?

@rappasoft
Copy link
Owner Author

rappasoft commented Jul 6, 2016

Sure here: 8b6e761

@ninjaparade as for your other question no i've never had more need than the user object for those events.

@ninjaparade
Copy link
Contributor

ninjaparade commented Jul 6, 2016

@rappasoft ya me either. You could just bind the \App\Listeners\Frontend\Auth\UserLoggedInListener and \App\Listeners\Frontend\Auth\UserLoggedOutListener to the Session events.

Illuminate\Auth\Events\Login and Illuminate\Auth\Events\Logout and keep deleting code from your repo 💃

They're fired here

https://github.com/laravel/framework/blob/5.2/src/Illuminate/Auth/SessionGuard.php#L467

https://github.com/laravel/framework/blob/5.2/src/Illuminate/Auth/SessionGuard.php#L568

@rappasoft
Copy link
Owner Author

Here's the current change/feature list:

  • Removed fluff code in backend/includes/header, see adminlte documentation for markup.
  • Added member since timestamp to backend user popup.
  • Added user roles list to backend user popup.
  • Removed roles.web_developer translation line as it is no longer needed.
  • Removed the button in the lower left of backend user popup and replaced with home button.
  • Moved home translation from navs.frontend.home to navs.general.home.
  • Deleted navs.backend.button translation as no longer needed.
  • Replaced all instances of trans(‘nav.frontend.home’) to trans(‘nav.general.home’)
  • Replaced all html links with link helper methods in backend/includes/header.php
  • Used correct blade syntax where necessary in backend/includes/header.php
  • Corrected blade syntax in change, email, reset, login, register.blade.php
  • Added guest() method to access class
  • Added logout() method to access class
  • Corrected blade syntax in frontend nav and converted html links to link helper methods.
  • Corrected blade syntax in profile/edit.blade.php, user/dashboard.blade.php, macros.blade.php, ga.blade.php, lang.blade.php
  • Converted html links to link helper methods in user/dashboard.blade.php
  • Corrected blade syntax in messages.blade.php and used session() helper instead of facade.
  • Added margin/padding helpers.
  • Fixed blade syntax and added link helpers on access header buttons and group create/edit.
  • Fixed forgot password email translation
  • Removed permission/dependency/groups management in its entirety
  • Added session timeout middleware preset to 10 minutes.
  • Many small cleanups
  • Converted all uses of {!! !!} to {{ }} where applicable for security reasons.
  • Replaced html label/checkbox/submit items with form facade versions.
  • Removed any inline styles for external versions.
  • Turned on debugbar query tracer so you can attempt to tell where each query originates.
  • Check for mail failures when sending confirmation email from backend and display to user.
  • Added datatables jquery plugin and replaced default index for users/roles with searchable/filterable datatables.
  • Added suggested sort number when creating a new role.
  • Modular history class that lets you log any activity to one table and show globally, by type, or by entity. Supports multiple links via array. Trans links stored in database and converted when displayed using history.php lang files.
  • Added “Login As” feature for admins to login as whatever user they please for whatever the reason may be.
  • Fixed social users with no email by making one with the name and provider.
  • Added user confirmed event.
  • Remove delete user/deactivate button for self.
  • Remove system property from permissions as its no longer needed.
  • Changed all guarded properties to fillable as they have been studied to be better for use.

@rappasoft
Copy link
Owner Author

I think i've changed enough thus far to govern a 3.0 tag at this point anyway. I'm going to go through all the functionality, make new screenshots, update wiki, hopefully tomorrow.

@pe3udent
Copy link

pe3udent commented Jul 6, 2016

@rappasoft awesome project! thanks for it.

I 've found a bug: datatable's search starts every time on key press. It may be better to add a timeout?

@pe3udent
Copy link

pe3udent commented Jul 6, 2016

@blomdahldaniel
Copy link
Contributor

@rappasoft you'r the man!

@rappasoft
Copy link
Owner Author

screen shot 2016-07-06 at 12 04 06 pm

Soon..

@rappasoft
Copy link
Owner Author

Released! Thanks for the help guys. Screenshots and wiki updated. Just have to write the docs on the new history facade.

Find and submit bugs as normal now.

@dylangeorgeharbour
Copy link

Well done! Keen to play with it!

Thanks for all the hard work!

@rappasoft
Copy link
Owner Author

@minaung7
Copy link

Hi,Excuse me sir,May i know something.I'm using laravel boilerplate.Laravel boilerplate had contained the language setting for backend so i can change the language easily but i don't know how to change the language for my frontend web page.so please sir,Could you explain me how to do it cause i'm a new laravel beginner?Respect to Senior elder brother.So please.......

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

No branches or pull requests

10 participants