mohamicorp / stash-jenkins-postreceive-webhook

Webhook used to notify Jenkins when commits are made to Stash
Other
138 stars 98 forks source link

Strange exception for non-admin users #32

Closed PHOENIX-MEDIA closed 10 years ago

PHOENIX-MEDIA commented 10 years ago

Hi!

We get a strange exception for non-admin users that only have write permission to the repo:

    at sun.proxy.$Proxy223.getSettings(Unknown Source) ~[na:na]
    at com.nerdwin15.stash.webhook.service.eligibility.IgnoreCommittersEligibilityFilter.shouldDeliverNotification(IgnoreCommittersEligibilityFilter.java:39) ~[na:na]
    at com.nerdwin15.stash.webhook.service.eligibility.ConcreteEligibilityFilterChain.shouldDeliverNotification(ConcreteEligibilityFilterChain.java:27) ~[na:na]
    at com.nerdwin15.stash.webhook.RepositoryChangeListener.onRefsChangedEvent(RepositoryChangeListener.java:34) ~[na:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_24]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.6.0_24]

The hook ends up with

java.lang.RuntimeException: You are not permitted to access this resource

in atlassian-stash.log.

For admin users everything works fine. For all others the hook is not completed.

mikesir87 commented 10 years ago

Thanks for the information and for the stacktrace. I'll take a look into it and see what I can figure out. More to come soon...

mikesir87 commented 10 years ago

For those affected, what version of Stash are you running?

PHOENIX-MEDIA commented 10 years ago

2.7 and 2.8.2 show the same error.

Regards Björn


PHOENIX MEDIA GmbH

Am 16.10.2013 um 19:59 schrieb "Michael Irwin" notifications@github.com<mailto:notifications@github.com>:

For those affected, what version of Stash are you running?

— Reply to this email directly or view it on GitHubhttps://github.com/Nerdwin15/stash-jenkins-postreceive-webhook/issues/32#issuecomment-26442108.

mikesir87 commented 10 years ago

Ok. Thanks.

ashnazg commented 10 years ago

Stacktrace on #33 is from Stash v2.6.2.

mikesir87 commented 10 years ago

Thanks. I've been able to confirm the issue. I'll see what I can do to fix the issue and get an update released. Guess I need to add non-admin users to my testing workflow. Didn't think that would be an issue. Thanks for your patience.

mikesir87 commented 10 years ago

Found a solution (thanks to Atlassian Answers support) and have updated the codebase. The plugin is building now and will be available on the marketplace shortly. Thanks!

PHOENIX-MEDIA commented 10 years ago

Thanks, sounds awesome! Will update our instance asap.

Am 17.10.2013 um 00:22 schrieb "Michael Irwin" notifications@github.com<mailto:notifications@github.com>:

Found a solution (thanks to Atlassian Answers support) and have updated the codebase. The plugin is building now and will be available on the marketplace shortly. Thanks!

— Reply to this email directly or view it on GitHubhttps://github.com/Nerdwin15/stash-jenkins-postreceive-webhook/issues/32#issuecomment-26464245.

mikesir87 commented 10 years ago

Hmm... running into an issue getting the plugin uploaded into the Marketplace. Trying to get up with Atlassian to figure out why this version isn't working but the one a few days ago did. May still be a few hours then. I'll post back once it's up.

mikesir87 commented 10 years ago

Just heard from Atlassian. They've confirmed there's a bug in the latest release of the Atlassian Marketplace. Said the fix should be deployed within a few hours. Looks like I'll try to upload the fix first thing in the morning.

mikesir87 commented 10 years ago

Just tried it again and it's up in the marketplace. Should be good to go now! Let me know if you see any other issues.