@selkirk-systems/selkirk-utils 1.0.8 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './utils/ArrayUtils';
2
+ export * from './utils/AuthUtils';
2
3
  export * from './utils/CacheUtils';
3
4
  export * from './utils/DateUtils';
4
5
  export * from './utils/EntityUtils';
@@ -0,0 +1,4 @@
1
+ export const userHasAuthority = authString => {
2
+ if (!window.user) return false;
3
+ return window.user.authorities.includes(authString);
4
+ };
package/lib/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './utils/ArrayUtils';
2
+ export * from './utils/AuthUtils'
2
3
  export * from './utils/CacheUtils';
3
4
  export * from './utils/DateUtils';
4
5
  export * from './utils/EntityUtils';
@@ -0,0 +1,6 @@
1
+ export const userHasAuthority = (authString)=>{
2
+
3
+ if(!window.user) return false;
4
+
5
+ return window.user.authorities.includes(authString)
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selkirk-systems/selkirk-utils",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Utils we often use in our web projects",
5
5
  "keywords": [],
6
6
  "author": "Marcos Bernal <mbernal@selkirksystems.com>",
@@ -40,5 +40,5 @@
40
40
  "dependencies": {
41
41
  "clsx": "^2.1.1"
42
42
  },
43
- "gitHead": "8d584252be9b0530ca120ac0eed44c5d0bb2105e"
43
+ "gitHead": "f72f3272cd93cfe11d01433cc05b80371180ff46"
44
44
  }