Add user page to admin panel, improve other admin pages #88
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "feature/admin_user_details"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
WIP: Add user page to admin panel, improve other admin pagesto Add user page to admin panel, improve other admin pagesAdd user page to admin panel, improve other admin pagesto WIP: Add user page to admin panel, improve other admin pagesWIP: Add user page to admin panel, improve other admin pagesto Add user page to admin panel, improve other admin pagesLooks very good. I haven't railsed in a while, so I'm not quite sure if the DB question/suggestion makes sense :D
@ -0,0 +10,4 @@@stats = {users_confirmed: User.where(ou: @ou).confirmed.count,users_pending: User.where(ou: @ou).pending.countIsn't this creating a new DB
COUNTquery? Since the@usersare already there, wouldn't a@users.pending.sizebe more performant?@usersis not filtered by pending at that point, so.pendingwould actually create a query that selects all fields from the table using that filter, and then.sizewould convert the results into an array and count the contained items I believe. So.countshould be more performant if that is correct.@ -40,3 +40,3 @@namespace :admin doroot to: 'dashboard#index'get 'ldap_users', to: 'ldap_users#index'resources 'users', param: 'address', only: ['index', 'show'], constraints: { address: /.*/ }What's the
constraintsfor? Doesn't the regex basically allow anything?It's to prevent Rails from parsing out the part behind the dot character as a format type. It would otherwise regard e.g. the "org" in "user@kosmos.org" as format "org".