Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes focused on enhancing user creation and privilege management in the
wunderDB
project. The most important changes include updating the user creation process to include metadata, modifying privilege names for clarity, and incorporating authentication handling.Enhancements to user creation:
internal/server/handlers/users.go
: Updated theCreateUser
function to parse metadata from the request body and handle user credentials via a new authentication handler.pkg/wdb/users.go
: Modified theCreateUser
method to accept metadata as a parameter and pass it to the user creation logic. [1] [2]pkg/wdb/wdb.go
: Updated theClient
interface to include metadata in theCreateUser
method signature.Privilege management improvements:
documentation/README.md
: Renamed privileges fromaddData
,readData
,updateData
, anddeleteData
toaddRecords
,readRecords
,updateRecords
, anddeleteRecords
for better clarity.Documentation update:
documentation/README.md
: Updated the user creation example to include metadata in the JSON body and added anAuthorization
header for better clarity.Codebase maintenance:
internal/filter/filters.go
: Simplified theFilter
function signature by removing redundant parentheses.internal/server/handlers/users.go
: Removed thenewUser
struct, as it is no longer needed with the new user creation process.These changes collectively improve the functionality and clarity of the user creation process and privilege management in the
wunderDB
project.