Skip to content

Commit

Permalink
chore: change default permissions to new standard (RDU-48) (#1180)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnussbaum authored Oct 30, 2024
1 parent 71eaa23 commit 8dedbe2
Show file tree
Hide file tree
Showing 31 changed files with 1,067 additions and 1,158 deletions.
17 changes: 9 additions & 8 deletions docs/excel2xml-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,13 @@ Then, the root element is created, which represents the `<knora>` tag of the XML
As first children of `<knora>`, some standard permissions are added. At the end, please carefully check the permissions
of the finished XML file to ensure that they meet your requirements, and adapt them if necessary.

The standard permission of a resource is `res-default`, and of a property `prop-default`. If you don't specify it
otherwise, all resources and properties get these permissions.
The standard permission is `open`
(read more about this [here](./file-formats/xml-data-file.md#defining-permissions-with-the-permissions-element)).
If you don't specify it otherwise, all resources and properties get this permission.

With `excel2xml`, it is not possible to create resources/properties that don't have permissions, because they would be
invisible for all users except project admins and system admins. [Read more about permissions
here](./file-formats/xml-data-file.md#using-permissions-with-the-permissions-attribute).
invisible for all users except project members. [Read more about permissions
here](./file-formats/xml-data-file.md#defining-permissions-with-the-permissions-element).


## 4. Create List Mappings
Expand Down Expand Up @@ -224,7 +225,7 @@ Here's how the docstrings assist you:
#### Fine-Tuning With the `PropertyElement`

There are two possibilities how to create a property: The value can be passed as it is, or as a `PropertyElement`. If it
is passed as it is, the `permissions` are assumed to be `prop-default`, texts are assumed to be encoded as `utf8`, and
is passed as it is, the `permissions` are assumed to be `open`, texts are assumed to be encoded as `utf8`, and
the value won't have a comment:

```python
Expand All @@ -233,7 +234,7 @@ make_text_prop(":testproperty", "first text")

```xml
<text-prop name=":testproperty">
<text encoding="utf8" permissions="prop-default">first text</text>
<text encoding="utf8" permissions="open">first text</text>
</text-prop>
```

Expand All @@ -244,7 +245,7 @@ make_text_prop(
":testproperty",
PropertyElement(
value="first text",
permissions="prop-restricted",
permissions="restricted",
encoding="xml",
comment="some comment"
)
Expand All @@ -253,7 +254,7 @@ make_text_prop(

```xml
<text-prop name=":testproperty">
<text encoding="xml" permissions="prop-restricted" comment="some comment">first text</text>
<text encoding="xml" permissions="restricted" comment="some comment">first text</text>
</text-prop>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/file-formats/excel2xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ Some notes:
`LinkObj`, and `Region`.
- The columns `ark`, `iri`, and `creation_date` are only used for DaSCH internal data migration.
- If `file` is provided, but no `file permissions`, an attempt will be started to deduce them from the resource
permissions (`res-default``prop-default` and `res-restricted``prop-restricted`). If this attempt is not
permissions. If this attempt is not
successful, a `BaseError` will be raised.
Loading

0 comments on commit 8dedbe2

Please sign in to comment.