Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Remove checking for Read permission #256

Merged
merged 3 commits into from
Jul 20, 2017
Merged

Remove checking for Read permission #256

merged 3 commits into from
Jul 20, 2017

Conversation

hiboyang
Copy link
Contributor

No description provided.

@hiboyang hiboyang requested review from thuningxu, datoug and kirg July 19, 2017 22:47
@@ -666,7 +666,7 @@ func (h *Frontend) CreateDestination(ctx thrift.Context, createRequest *c.Create
dstResource := common.GetResourceURNOperateDestination(h.SCommon, createRequest.Path)
h.addPermissions(subject,
dstResource,
[]common.Operation{common.OperationRead, common.OperationUpdate, common.OperationDelete},
[]common.Operation{common.OperationUpdate, common.OperationDelete},
Copy link
Contributor

Choose a reason for hiding this comment

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

update the comment above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

@@ -666,7 +666,7 @@ func (h *Frontend) CreateDestination(ctx thrift.Context, createRequest *c.Create
dstResource := common.GetResourceURNOperateDestination(h.SCommon, createRequest.Path)
h.addPermissions(subject,
dstResource,
[]common.Operation{common.OperationRead, common.OperationUpdate, common.OperationDelete},
[]common.Operation{common.OperationUpdate, common.OperationDelete},
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove the common.OperationRead enum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion

@@ -1002,7 +1002,7 @@ func (h *Frontend) UpdateDestination(ctx thrift.Context, updateRequest *c.Update
dstResource := common.GetResourceURNOperateDestination(h.SCommon, updateRequest.Path)
h.addPermissions(ownerSubject,
dstResource,
[]common.Operation{common.OperationRead, common.OperationUpdate, common.OperationDelete},
[]common.Operation{common.OperationUpdate, common.OperationDelete},
Copy link
Contributor

Choose a reason for hiding this comment

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

update comment above

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 68.011% when pulling 10e1648 on disable_read_perm into 8a7eca6 on master.

@hiboyang
Copy link
Contributor Author

Updated code per comments

@coveralls
Copy link

coveralls commented Jul 19, 2017

Coverage Status

Coverage increased (+0.03%) to 68.276% when pulling 10e1648 on disable_read_perm into 8a7eca6 on master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.4%) to 67.852% when pulling f85eff9 on disable_read_perm into 8a7eca6 on master.

@hiboyang hiboyang merged commit 24ebf96 into master Jul 20, 2017
@hiboyang hiboyang deleted the disable_read_perm branch July 20, 2017 21:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants