Skip to content

Commit 8a5eee5

Browse files
committed
createRolesFunctionInfo
1 parent b7b0eaf commit 8a5eee5

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

services/static-webserver/client/source/class/osparc/data/Roles.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,10 @@ qx.Class.define("osparc.data.Roles", {
298298
return this.__createRolesLayout(osparc.data.Roles.STUDY);
299299
},
300300

301+
createRolesFunctionInfo: function() {
302+
return this.__createRolesLayout(osparc.data.Roles.FUNCTION);
303+
},
304+
301305
createRolesServicesInfo: function() {
302306
return this.__createRolesLayout(osparc.data.Roles.SERVICES);
303307
},

services/static-webserver/client/source/class/osparc/share/Collaborators.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,12 @@ qx.Class.define("osparc.share.Collaborators", {
250250
case "template":
251251
case "tutorial":
252252
case "hypertool":
253-
case "function":
254253
case "tag":
255254
rolesLayout = osparc.data.Roles.createRolesStudyInfo();
256255
break;
256+
case "function":
257+
rolesLayout = osparc.data.Roles.createRolesFunctionInfo();
258+
break;
257259
case "service":
258260
rolesLayout = osparc.data.Roles.createRolesServicesInfo();
259261
break;
@@ -362,7 +364,6 @@ qx.Class.define("osparc.share.Collaborators", {
362364
"template",
363365
"tutorial",
364366
"hypertool",
365-
"function",
366367
].includes(this._resourceType) &&
367368
!osparc.share.CollaboratorsStudy.canCollaboratorBeRemoved(this._serializedDataCopy, orgMember["gid"])
368369
) {
@@ -391,7 +392,12 @@ qx.Class.define("osparc.share.Collaborators", {
391392
__getLeaveStudyButton: function() {
392393
const myGid = osparc.auth.Data.getInstance().getGroupId();
393394
if (
394-
["study", "template", "tutorial", "hypertool"].includes(this._resourceType) &&
395+
[
396+
"study",
397+
"template",
398+
"tutorial",
399+
"hypertool",
400+
].includes(this._resourceType) &&
395401
osparc.share.CollaboratorsStudy.canCollaboratorBeRemoved(this._serializedDataCopy, myGid)
396402
) {
397403
const leaveText = this.tr("Leave") + " " + osparc.product.Utils.getStudyAlias({

services/static-webserver/client/source/class/osparc/ui/list/CollaboratorListItem.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ qx.Class.define("osparc.ui.list.CollaboratorListItem", {
8282
case "template":
8383
case "tutorial":
8484
case "hypertool":
85-
case "function":
8685
case "tag":
8786
roleInfo = osparc.data.Roles.STUDY[id];
8887
break;
88+
case "function":
89+
roleInfo = osparc.data.Roles.FUNCTION[id];
90+
break;
8991
case "service":
9092
roleInfo = osparc.data.Roles.SERVICES[id];
9193
break;

0 commit comments

Comments
 (0)