Skip to content

Commit

Permalink
feat(is-verified): method to check last authorization level
Browse files Browse the repository at this point in the history
  • Loading branch information
leomp12 committed Aug 23, 2019
1 parent 8dd4baf commit a588273
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/methods/is-authorized.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// it does not validate authentication token
// only checks session auth level
export default self => self.session.auth && self.session.auth.level >= 2
export default self => Boolean(self.session.auth && self.session.auth.level >= 2)
4 changes: 4 additions & 0 deletions src/methods/is-verified.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// it does not validate authentication token
// only checks session auth level
// last authorization level
export default self => Boolean(self.session.auth && self.session.auth.level >= 3)

0 comments on commit a588273

Please sign in to comment.