Git Product home page Git Product logo

Comments (5)

JasonTypesCodes avatar JasonTypesCodes commented on June 29, 2024

The roles are: Admin, Manager, User ?

from five15.

osscontributor avatar osscontributor commented on June 29, 2024

I think those are fine until we find out that we need others.

from five15.

JasonTypesCodes avatar JasonTypesCodes commented on June 29, 2024

Does this story include anything for the Grails side?

I've added some users to the angular side. Feel free to login as user:user, manager:manager, or admin:admin. Nothing spectacular happens yet, but I do have the 'report' state limited to accounts with the 'user' role.

@craigburke I extended the data field in the state config object to show what roles a state expects users to have to allow a transition to the next state. What do you think of this approach? It feels clean to me. I'm also curious about what I need to do to make use of the annotate and closure-wrap modules in the asset pipeline.

Let me know what you think.

from five15.

craigburke avatar craigburke commented on June 29, 2024

@VoltiSubito I really like what you did with the roles. Alternatively we could add an $http interceptor to redirect to $state('login') when we get a 403 response: https://docs.angularjs.org/api/ng/service/$http

I think I like your approach better though. It has the advantage of not requiring each state to have an http request to trigger the 403 and not triggering any requests at all before you are authenticated. We'll have some redundancy on the backend but I think it's really slick 👍

As for the asset pipeline stuff. I actually put a couple pull requests in to the asset pipeline core project to help with those two modules. The closure wrap will automatically wrap any js file with the directive option:

//= wrapped

As for the annotation we'll actually have a decision to make on that front. Basically it'll boil down to using my annotate plugin (which will just work out of the box) or getting much better build performance using the soon to be available angularPass compile setting in new version of AP. It's faster but we'll have to put a special comment before each function like this:

// @ngInject 
function FooController($scope) { 
...
}

So we'll just have to see which approach makes most sense.

from five15.

osscontributor avatar osscontributor commented on June 29, 2024

We have a dummied up in memory thing now so I am going to go ahead and close this. We need to start building real auth but will track that as separate issues.

from five15.

Related Issues (17)

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.