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

Allow to read logs for public repo in ws #884

Merged
merged 1 commit into from
Feb 21, 2015

Conversation

floatdrop
Copy link

Fix for #882. If repository is public, but no rows in perms table is met - logs should still be accessable.

@floatdrop floatdrop changed the title Do not request Read permission for public repo Allow to read logs for public repo in ws Feb 20, 2015
@bradrydzewski
Copy link

We should probably only log when err != nil && err != sql.ErrNotFound otherwise it will spam the logs with false positive errors

@floatdrop
Copy link
Author

Done.

log.Printf("WS: No read access for repository %s\n", work.Repo.Name)
}
if work.Repo.Private == true && role.Read == false {
log.Printf("WS: No read access for repository %s\n", work.Repo.Name)

Choose a reason for hiding this comment

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

actually this login should be removed also, since it is expected behavior. This is a global event feed. This means if 1000 users are logged-in to Drone, 1000 users will get this message. If only 1 user has access, we would see 999 log entries.

Copy link
Author

Choose a reason for hiding this comment

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

@bradrydzewski make sens. Removed logging, but build is failing on fetching deps.

bradrydzewski added a commit that referenced this pull request Feb 21, 2015
Allow to read logs for public repo in ws
@bradrydzewski bradrydzewski merged commit 436b7a6 into harness:master Feb 21, 2015
bot2-harness pushed a commit that referenced this pull request Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants