Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [Frontend] Feature: Share Tags #6899

Merged
merged 39 commits into from
Jan 8, 2025
Merged
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1222d6d
refactor
odeimaiz Dec 3, 2024
74c1fd8
multiselect propoerty
odeimaiz Dec 3, 2024
67ed884
refactor
odeimaiz Dec 3, 2024
7cc1727
more compact icon
odeimaiz Dec 3, 2024
b5988fd
aesthetics
odeimaiz Dec 3, 2024
d129744
[skip ci] allowMultiselection
odeimaiz Dec 3, 2024
57448e3
Merge branch 'master' into enh/multiselect-data
odeimaiz Dec 4, 2024
3e1870d
Merge branch 'master' into enh/multiselect-data
odeimaiz Dec 4, 2024
a95fc6e
minor
odeimaiz Dec 4, 2024
82c013d
multiSelectionChanged
odeimaiz Dec 4, 2024
8e28e68
minor
odeimaiz Dec 4, 2024
7104733
tag accessRights
odeimaiz Dec 4, 2024
d86c061
fetchAccessRights
odeimaiz Dec 4, 2024
f71e3ca
Merge branch 'master' into feature/share-tags
odeimaiz Jan 6, 2025
01eabbe
better practises
odeimaiz Jan 6, 2025
82855c0
[skip ci] share-icon
odeimaiz Jan 6, 2025
7b21119
Merge branch 'master' into feature/share-tags
odeimaiz Jan 7, 2025
fbe8e31
CollaboratorsTag
odeimaiz Jan 7, 2025
fd25441
Merge branch 'master' into feature/share-tags
odeimaiz Jan 7, 2025
9677df1
text
odeimaiz Jan 7, 2025
33adc76
minor fix
odeimaiz Jan 7, 2025
766ee8f
canI write/delete
odeimaiz Jan 7, 2025
a215c9d
myAccessRights
odeimaiz Jan 7, 2025
a6d75ed
[skip ci] refactoring
odeimaiz Jan 7, 2025
8c1d22f
minors
odeimaiz Jan 7, 2025
684e2ee
minor
odeimaiz Jan 7, 2025
815bd4c
Merge branch 'master' into feature/share-tags
odeimaiz Jan 7, 2025
cc826bb
Merge branch 'feature/share-tags' of github.com:odeimaiz/osparc-simco…
odeimaiz Jan 7, 2025
ae45706
myAccessRights
odeimaiz Jan 7, 2025
4f3102b
populate share icon
odeimaiz Jan 7, 2025
1844cbe
list collaborators
odeimaiz Jan 7, 2025
0f1ba36
fix postTag
odeimaiz Jan 7, 2025
0c8e8e2
CRUD accessRights
odeimaiz Jan 7, 2025
73bcf94
viewer per default
odeimaiz Jan 7, 2025
df4ca4c
update shared icon
odeimaiz Jan 7, 2025
081de8d
Merge branch 'master' into feature/share-tags
odeimaiz Jan 7, 2025
5a53f1a
Merge branch 'master' into feature/share-tags
odeimaiz Jan 7, 2025
68f482d
Merge branch 'master' into feature/share-tags
odeimaiz Jan 7, 2025
d6f8ff8
Merge branch 'master' into feature/share-tags
odeimaiz Jan 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
myAccessRights
odeimaiz committed Jan 7, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit a215c9d6d7463041734906b1f973cddeefbed112
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ qx.Class.define("osparc.data.model.Tag", {
name: tagData.name,
description: tagData.description,
color: tagData.color,
accessRights: tagData.accessRights,
myAccessRights: tagData.accessRights,
});
},

@@ -65,6 +65,13 @@ qx.Class.define("osparc.data.model.Tag", {
init: "#303030"
},

myAccessRights: {
check: "Object",
nullable: false,
init: null,
event: "changeMyAccessRights"
},

accessRights: {
check: "Object",
nullable: false,
@@ -74,24 +81,12 @@ qx.Class.define("osparc.data.model.Tag", {
},

statics: {
canIWrite: function(tagAccessRights) {
const groupsStore = osparc.store.Groups.getInstance();
const orgIDs = groupsStore.getOrganizationIds();
orgIDs.push(groupsStore.getMyGroupId());
if (orgIDs.length) {
return osparc.share.CollaboratorsTag.canGroupsWrite(tagAccessRights, (orgIDs));
}
return false;
canIWrite: function(myAccessRights) {
return myAccessRights["write"];
},

canIDelete: function(tagAccessRights) {
const groupsStore = osparc.store.Groups.getInstance();
const orgIDs = groupsStore.getOrganizationIds();
orgIDs.push(groupsStore.getMyGroupId());
if (orgIDs.length) {
return osparc.share.CollaboratorsTag.canGroupsDelete(tagAccessRights, (orgIDs));
}
return false;
canIDelete: function(myAccessRights) {
return myAccessRights["delete"];
},
},

Original file line number Diff line number Diff line change
@@ -31,24 +31,6 @@ qx.Class.define("osparc.share.CollaboratorsTag", {
},

statics: {
canGroupsWrite: function(accessRights, gIds) {
let canWrite = false;
for (let i=0; i<gIds.length && !canWrite; i++) {
const gid = gIds[i];
canWrite = (gid in accessRights) ? accessRights[gid]["write"] : false;
}
return canWrite;
},

canGroupsDelete: function(accessRights, gIds) {
let canWrite = false;
for (let i=0; i<gIds.length && !canWrite; i++) {
const gid = gIds[i];
canWrite = (gid in accessRights) ? accessRights[gid]["delete"] : false;
}
return canWrite;
},

getViewerAccessRight: function() {
return {
"read": true,