Skip to content

Conversation

@lidiazuin
Copy link
Contributor

@lidiazuin lidiazuin commented Jul 25, 2022

@lidiazuin lidiazuin added the 4.4 Neo4j version 4.4 label Jul 25, 2022
@netlify
Copy link

netlify bot commented Jul 25, 2022

Deploy Preview for neo4j-docs-cypher ready!

Name Link
🔨 Latest commit 2540f0f
🔍 Latest deploy log https://app.netlify.com/sites/neo4j-docs-cypher/deploys/62dfbe32d14e3e0009056b22
😎 Deploy Preview https://deploy-preview-28--neo4j-docs-cypher.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@martin-neotech martin-neotech left a comment

Choose a reason for hiding this comment

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

Just change the spelling and nothing else.

These changes also then need to be cherry-picked to the dev (5.0) branch. So dont create more huge PRs that is just improving the content before we have properly moved away from the old repository or we will never catch up.

@@ -1,5 +1,3 @@
:description: The default privileges of the built-in roles in Neo4j and how to recreate them if needed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Dont remove the :description: attribute. This is being used on the html output in the meta tag.

In the old repository the :abstract: text is extracted and creates a :description: attribute automagically, we dont want to enforce having an abstract on each page so this is why.

All of the commands described in this chapter require that the user executing the commands has the rights to do so.
The privileges listed in the following sections are the default set of privileges for each built-in role:

* xref::access-control/built-in-roles.adoc#access-control-built-in-roles-public[The `PUBLIC` role]
Copy link
Contributor

Choose a reason for hiding this comment

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

In the old repository there is automagic that finds links and create xref links.

We want to have xref links so we know exactly what it is referring to.

Dont overwrite any links.

Also the documents have been structured so that if there is no need for a nested folder there is no need for an index file so it is much simpler and easier to find the files.

[[access-control-built-in-roles-public-list]]
=== Listing `PUBLIC` role privileges

[source, cypher, role=noplay, indent=0]
Copy link
Contributor

Choose a reason for hiding this comment

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

This is fine.

There is much to do to cleanup so there is a consistent style for the different code blocks. But lets do that after there is an easier workflow for this content.

[[access-control-built-in-roles-publisher]]
== The `publisher` role

The `publisher` role can do the same as xref::access-control/built-in-roles.adoc#access-control-built-in-roles-editor[`editor`], but can also create new labels, property keys and relationship types.
Copy link
Contributor

Choose a reason for hiding this comment

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

Dont overwrite any links.

| Description
| Revoke a denied privilege from one or multiple roles.

.General database privilege command syntax
Copy link
Contributor

Choose a reason for hiding this comment

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

There is new formatting for this content dont change it.

The old style is difficult to read and the structure is not nice when there is more content being added.

With `ACCESS` you can run calculations, for example, `RETURN 2*5 AS answer` or call functions `RETURN timestamp() AS time`.

[source, syntax, role="noheader", indent=0]
[source, cypher, role=noplay]
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't change the syntax tag, there is Cypher but it is syntax and not run-able Cypher.

And the syntax should not have a header for aesthetics and it is easier to read.

@martin-neotech martin-neotech added the improvements Improved the text or examples label Jul 25, 2022
Copy link
Contributor

@martin-neotech martin-neotech left a comment

Choose a reason for hiding this comment

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

I have looked at it again. There is just way to much format/structural changes.

If you think this work is to huge take one page at a time and create a PR for that page.

Just have editorial/spelling changes.

I only looked to the database-administration page etc. because this PR is so huge.

Comment on lines 57 to 81
.General database privilege command syntax
[options="header", width="100%", cols="3a,2"]
|===
| Command | Description

| [source, cypher, role=noplay]
GRANT database-privilege ON {HOME DATABASE \| DATABASE[S] {* \| name[, ...]}} TO role[, ...]
| Grants a privilege to one or multiple roles.

.General revoke +ON DATABASE+ privilege syntax
[cols="<15s,<85"]
|===

| Command
m| +REVOKE ... ON ... FROM ...+
| [source, cypher, role=noplay]
DENY database-privilege ON {HOME DATABASE \| DATABASE[S] {* \| name[, ...]}} TO role[, ...]
| Denies a privilege to one or multiple roles.

| Syntax
a|
[source, syntax, role="noheader", indent=0]
----
REVOKE database-privilege ON { HOME DATABASE \| DATABASE[S] { * \| name[, ...] } } FROM role[, ...]
----
| [source, cypher, role=noplay]
REVOKE GRANT database-privilege ON {HOME DATABASE \| DATABASE[S] {* \| name[, ...]}} FROM role[, ...]
| Revokes a granted privilege from one or multiple roles.

| Description
| Revoke a granted or denied privilege from one or multiple roles.
| [source, cypher, role=noplay]
REVOKE DENY database-privilege ON {HOME DATABASE \| DATABASE[S] {* \| name[, ...]}} FROM role[, ...]
| Revokes a denied privilege from one or multiple roles.

| [source, cypher, role=noplay]
REVOKE database-privilege ON {HOME DATABASE \| DATABASE[S] {* \| name[, ...]}} FROM role[, ...]
| Revokes a granted or denied privilege from one or multiple roles.
|===
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: dont change the format. There are now a table for each syntax.

The components of the database privilege commands are:

* the command:
* the commands:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* the commands:
* Commands:

lidiazuin and others added 3 commits July 26, 2022 12:09
components of the database privilege commands
Co-authored-by: Martin <martin.bendsoe@neotechnology.com>
@lidiazuin
Copy link
Contributor Author

Closing this PR as it was separated into different ones for easier review:

#31
#32
#33
#34
#35
#36
#37
#38
#39
#40

@lidiazuin lidiazuin closed this Jul 26, 2022
@martin-neotech martin-neotech deleted the 4.4-accesscontrolreview branch August 5, 2022 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.4 Neo4j version 4.4 improvements Improved the text or examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants