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

SQL Commands - Create/Drop User #4000

Merged
merged 4 commits into from Aug 6, 2015

Conversation

matanshukry
Copy link
Contributor

The following are two sections, each for the documentation regarding the 2 new commands,
create user and drop user. They are simply followed one by another in this page, but they are supposed to be separated and put each in his own file.

SQL - CREATE USER

Creates a user in the current database, with the specified password and an optional role.
Note that if a role isn't specified, a default role ("writer") is used.

Note this is simply a wrapper around OUser and ORole tables; Look up Security for more details.

Syntax

CREATE USER <user name> IDENTIFIED BY <password> [ROLE <role name>]

Examples

Creates a new user called 'Foo', with password 'bar', and role 'admin'

create user Foo identified by bar role admin

Creates a new user called 'Bar', with password 'Foo'

crete user Bar identified by Foo

To know more about other SQL commands look at SQL commands.

SQL - DROP USER

Drops a user from the current database.

Note this is simply a wrapper around OUser table; Look up Security for more details.

Syntax

DROP USER <user name>

Examples

Drop a user called 'Foo'

drop user Foo

To know more about other SQL commands look at SQL commands.

@matanshukry matanshukry changed the title Issue create drop user SQL Commands - Create/Drop User Apr 22, 2015
@lvca
Copy link
Member

lvca commented Apr 30, 2015

@matanshukry Thanks for this PR! We're in RC phase, I'll merge it for sure as soon as we'll switch to 2.2-SNAPSHOT.

@lvca lvca added this to the 2.2 milestone Apr 30, 2015
@lvca lvca self-assigned this Apr 30, 2015
@matanshukry
Copy link
Contributor Author

lvca - There seem to be more conflicts. Please comment again when the project has moved to 2.2-SNAPSHOT, I'll fix it and push again then (it will send me an email notification).

@lvca
Copy link
Member

lvca commented Aug 6, 2015

@matanshukry Now develop is 2.2-SNAPSHOT ;-) About this what do you think on supporting multiple roles syntax like:

CREATE USER <user name> IDENTIFIED BY <password> [ROLES <role name>, <role name>*]

Example:

CREATE USER jay IDENTIFIED BY miner ROLES genius, creative

or

CREATE USER <user name> IDENTIFIED BY <password> [ROLE [<role name>, <role name>*] ]

Example:

CREATE USER jay IDENTIFIED BY miner ROLE [genius, creative]

Conflicts:
	tools/src/main/java/com/orientechnologies/orient/console/OConsoleDatabaseApp.java
@matanshukry
Copy link
Contributor Author

I stayed with a single keyword, seems more consistent.
You can either do ROLE [admin, reader, etc] or ROLE admin

Also, merged again with develop.

lvca added a commit that referenced this pull request Aug 6, 2015
@lvca lvca merged commit d3c3db1 into orientechnologies:develop Aug 6, 2015
@lvca
Copy link
Member

lvca commented Aug 6, 2015

Thanks!

@lvca
Copy link
Member

lvca commented Aug 6, 2015

I saw test cases are missing, I'm going to write them.

lvca added a commit that referenced this pull request Aug 6, 2015
@matanshukry matanshukry deleted the issueCreateDropUser branch August 6, 2015 22:33
@matanshukry matanshukry restored the issueCreateDropUser branch August 8, 2015 19:56
@matanshukry matanshukry deleted the issueCreateDropUser branch August 8, 2015 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

2 participants