Advertisement
Guest User

Untitled

a guest
Oct 13th, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. {
  2. "users": [
  3. {
  4. "login": "admin",
  5. "password": "password",
  6. "role": "admin"
  7. }
  8. ]
  9. }
  10.  
  11. var User = Backbone.Model.extend({
  12. defaults: {
  13. login: "",
  14. password: "",
  15. role: ""
  16. },
  17. // haven't thought about this function yet
  18. isAdmin: function () {
  19. if this.get({role: "admin}) {
  20. return this;
  21. }
  22. }
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement