I am porting add-on from stash into bitbucket. The Bitbucket add-on uses RefRestrictionService to calls: setRestrictions() and hasPermission(). The Stash version of add-on used wired BranchPermissionService and restrictBranch() and so on.
Here the log snippet from atlas-run/debug when starting Bitbucket add-on:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.bitbucket.repository.ref.restriction.RefRestrictionService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:1301) ~[DefaultListableBeanFactory.class:4.3.2.RELEASE]
[INFO] [talledLocalContainer] ... 9 common frames omitted
The BranchPermissionService has implementation in BranchPermissionServiceImpl.
I have not found any implementation of RefRestrictionService.
Which artifact does provide the RefRestrictionService implementation of RefRestrictionService in bitbucket, please?
Community moderators have prevented the ability to post new answers.
Add the following line to your atlassian-plugin.xml
<component-import key="refRestrictionService" interface="com.atlassian.bitbucket.repository.ref.restriction.RefRestrictionService"/>
Please find more details in the code of my plugin My Branches. It is available for Stash as well as Bitbucket, so you can compare both branches:
https://bitbucket.org/jheger/stash-mybranches
Kind regards, Johannes
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.