visualvault-api 1.1.0 → 1.2.0

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.
@@ -18,6 +18,7 @@ module.exports = class StudioApi {
18
18
 
19
19
  if(this.isEnabled){
20
20
  this.workflow = new WorkflowManager(this._httpHelper);
21
+ this.permissions = new RolesAndPermissionsManager(this._httpHelper);
21
22
  }
22
23
  }
23
24
  }
@@ -134,3 +135,22 @@ class WorkflowManager{
134
135
  }
135
136
  }
136
137
 
138
+ class RolesAndPermissionsManager {
139
+ constructor(httpHelper) {
140
+ this._httpHelper = httpHelper;
141
+ }
142
+
143
+ /**
144
+ * Retrieves available features for the requesting user
145
+ * @param {object} params - Optional URL parameters to include in the request
146
+ */
147
+ async getUserFeatures(params) {
148
+ var resourceUri = this._httpHelper._config.ResourceUri.StudioApi.ResourceUserFeatures;
149
+ var url = this._httpHelper.getUrl(resourceUri);
150
+ var opts = { method: 'GET' };
151
+ var data = {};
152
+ params = params || {};
153
+
154
+ return this._httpHelper.doVvClientRequest(url, opts, params, data);
155
+ }
156
+ }