-
Notifications
You must be signed in to change notification settings - Fork 504
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
implement users store and access control #749
Conversation
rebased on v0.11 and close #704 |
Codecov Report
@@ Coverage Diff @@
## master #749 +/- ##
============================================
- Coverage 71.77% 71.64% -0.13%
- Complexity 4676 4914 +238
============================================
Files 298 309 +11
Lines 22382 23485 +1103
Branches 3178 3305 +127
============================================
+ Hits 16064 16826 +762
- Misses 4736 5023 +287
- Partials 1582 1636 +54
Continue to review full report at Codecov.
|
@@ -117,6 +131,12 @@ public static String decompress(byte[] value) { | |||
} | |||
} | |||
|
|||
public static String sha256(String string) { | |||
byte[] stringBytes = StringEncoding.encode(string); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
byte[] stringBytes = encode(string);
} | ||
|
||
public static <V> HugeAccess fromEdge(Edge edge) { | ||
HugeAccess belong = new HugeAccess((Id) edge.outVertex().id(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to access
public static final String CREATE = "~belong_create"; | ||
public static final String UPDATE = "~belong_update"; | ||
|
||
public static String unhide(String key) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unHide
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems there is unhide word
} | ||
|
||
public static HugeGroup fromVertex(Vertex vertex) { | ||
HugeGroup entity = new HugeGroup((Id) vertex.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to group
} | ||
|
||
public static HugeTarget fromVertex(Vertex vertex) { | ||
HugeTarget entity = new HugeTarget((Id) vertex.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
public class HugeUser extends Entity { | ||
|
||
/* | ||
* TODO: add vertex label: group and action (or group and graph) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete
} | ||
|
||
public static HugeUser fromVertex(Vertex vertex) { | ||
HugeUser entity = new HugeUser((Id) vertex.id()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
public static <T extends Relationship> T fromEdge(Edge edge, | ||
T relationship) { | ||
E.checkArgument(edge.label().equals(relationship.label()), | ||
"Illegal edge label '%s' for entity '%s'", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Illegal edge label '%s' for relationship '%s'",
byte[] stringBytes = encode(string); | ||
DIGEST.reset(); | ||
return Base64.getEncoder().encodeToString(DIGEST.digest(stringBytes)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BCrypt.hashpw(myPassword, BCrypt.gensalt(4))
BCrypt.checkpw(candidatePassword, dbPassword)
Change-Id: I6492c284b6677b9dd1ef545aaf08c5d6e5cf8ad7
implement: #209 Change-Id: Ia38bfd191b1ff15a6919f29dc5857272a696f222
Change-Id: I7f2ec3e318bbd29371bd907a8584ca11b0720ede
Change-Id: I92f992f98d52b2bfd4d1e316b9a00cb32c293288
Change-Id: I34cccde13d35596ccccbaee65d037bd33a9d97e9
Change-Id: If6f4a3fafdc117b91e5d49b2ccae464f859971d9
Change-Id: Iaf63b2b06526448646a5fec021c1bca0f51f25f1
Change-Id: Ia8c9bb70ff4aad038818f93ef33fe26e86aedbf0
Change-Id: Ic0dbe13ad34f068b88a07ba5852671eb26c1b8be
9d179cb
to
c757c40
Compare
Change-Id: I48c19def8578f230c5da5a9446148d678aab408e
Change-Id: I2264497d31b15285da75abe42d091abaad66ca8f
Change-Id: I1f7989b026504667e8ebc5cecb81eae8aacd65f4
implement: #209
Change-Id: I6492c284b6677b9dd1ef545aaf08c5d6e5cf8ad7