Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View rawaludin's full-sized avatar
:octocat:
Fix stuff

Rahmat Awaludin rawaludin

:octocat:
Fix stuff
View GitHub Profile

Sentry is an amazing auth system. But I really need a feature: multiple user types in the same app. And I cannot separate those in groups, because they have different table columns. After 2 days burning my head, I think I found a good solution. The magic is duplicate SentryServiceProvider with new different settings.

This was tested on Laravel 4.0 and Sentry 2. If you're using other version of Sentry, my suggestion is to follow same steps from this gist but use your local files instead copying files from here.

Lets suppose we have a fresh Sentry install with default User ambient. Now we want another ambient called Admin, with new model and different settings. How to do:

1. One model, one ambient

Logo

Now Hiring: ParkatmyHouse.com

At ParkatmyHouse.com we are looking to expand our small team to include a number of new development positions ahead of a major project. Go ahead and take a look at the role descriptions. If the must haves don't quite fit, let us know anyway, you never know!


Front-end Developer

Must have

@rawaludin
rawaludin / gist:3889706
Created October 14, 2012 20:22 — forked from padolsey/gist:527683
Snippet: JavaScript - Detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}