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

Organization context added #234

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion openIt/jsonld-contexts/openIt.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
"Authorization": "https://vocab.egm.io/Authorization",
"Gate": "https://vocab.egm.io/Gate",
"Key": "https://vocab.egm.io/Key",
"category": "https://schema.org/category",
"codes": "https://vocab.egm.io/codes",
"codeValidation": "https://vocab.egm.io/codeValidation",
"forGate": "https://vocab.egm.io/forGate",
"givenBy": "https://vocab.egm.io/givenBy",
"givenTo": "https://vocab.egm.io/givenTo",
"initDate": "https://vocab.egm.io/initDate",
"isAvailableForOrganization": "https://vocab.egm.io/isAvailableForOrganization",
"keyNumber": "https://vocab.egm.io/keyNumber",
"name": "https://schema.org/name",
"opensGate": "https://vocab.egm.io/opensGate",
"organization": "https://vocab.egm.io/organization",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it is a type, not an attribute? if so, it should be Organization.

and this one is better suited: https://schema.org/Organization

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, is it a group or an organization?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both I suppose. They used the terminology "Organism". I can swap to Organization entities. Would be better to have them separate anyways for managing them (adding, deleting, updating)

"period": "https://vocab.egm.io/period",
"rotationPeriod": "https://vocab.egm.io/rotationPeriod",
"usesKey": "https://vocab.egm.io/usesKey",
Expand Down
14 changes: 10 additions & 4 deletions openIt/ngsild-payloads/key.jsonld
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@
"type": "Property",
"value": "P1D"
},
"category": {
"type": "Property",
"value": "Fire Department"
}
"isAvailableForOrganization": [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it is a multi-instance attribute, you have to use datasetId to distinguish each instance

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood

{
"type": "Property",
"value": "Agglomération Provence Verte"
Comment on lines +26 to +27
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would instead see this as a relationship

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Will update with new Organization type

},
{
"type": "Property",
"value": "Gendarmerie"
}
]
}
16 changes: 16 additions & 0 deletions openIt/ngsild-payloads/userProfile.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "urn:ngsi-ld:UserProfile:123456789",
"type": "UserProfile",
"userInfos": {
"type": "JsonProperty",
"json": {
"familyName": "Smith",
"givenName": "John",
"email": "[email protected]"
}
},
"organization": {
"type": "Property",
"value": "Agglomération Provence Verte"
}
Comment on lines +12 to +15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if groups and groups membership are managed in KC, you can't duplicate them here (actually, Stellio already manages this info)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do this for SMBT though, for "Conch" & "Autre". That way can verify who has what access on the front via Admin account. For example, Admin user is approving an Authorization which has a relationship of "givenTo" which is a UserProfile id. That way we can then download the UserProfile and check which keys they have access to. Is there another way to achieve this?

}