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

wip: rgw: rest_admin/user avoid double checking input args #13460

Merged
merged 1 commit into from Feb 22, 2017

Conversation

Projects
None yet
2 participants
@theanalyst
Member

theanalyst commented Feb 16, 2017

Since all the op_state functions already check for string emptiness, the
check in the execute function becomes redundant.

Another TODO to knockdown is validate that the required args are passed in, we
currently return 403s instead of 400 even when required args for eg. uid
are not passed in

Signed-off-by: Abhishek Lekshmanan abhishek@suse.com

rgw: rest_admin/user avoid double checking input args
Since all the op_state functions already check for string emptiness, the
check in the execute function becomes redundant.

A TODO to knockdown is validate that the required args are passed in, we
currently return 403s instead of 400 even when required args for eg. uid
are not passed in

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>

@theanalyst theanalyst requested a review from cbodley Feb 16, 2017

@theanalyst theanalyst changed the title from rgw: rest_admin/user avoid double checking input args to wip: rgw: rest_admin/user avoid double checking input args Feb 16, 2017

@theanalyst

This comment has been minimized.

Member

theanalyst commented Feb 16, 2017

we could validate the required params as well, one possible way is to use the bool from get_string method and just doing an and operation and setting op_ret to an EINVAL

@cbodley cbodley self-assigned this Feb 16, 2017

@cbodley cbodley merged commit e7d7b8d into ceph:master Feb 22, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment