Trying to use web.conditions.IsLoggedInCondition in plugin Edited

I'm finishing up a new bitbucket plugin and trying to add conditions to the <web-item> defined in the atlassian-plugin.xml file, so that it only displays if several conditions are met..

 

<web-item key="project-plugin-tab" name="Project Secret" section="bitbucket.project.settings.panel/project-settings-addons-section" weight="30">
   	<conditions type="AND">
   	  <condition class="myclass.utilities.ValidLicenseCondition"/>
	  <condition class="com.atlassian.bitbucket.web.conditions.IsLoggedInCondition"/>
	  <condition class="com.atlassian.bitbucket.web.conditions.HasProjectPermissionCondition">
     			<param name="permission">PROJECT_ADMIN</param>
 	  </condition>
	</conditions>
...
..
</web-item>

It the spring scanner finds myclass condition, but fails to find IsLoggedInCondition or HasProjectPermissionCondition

[INFO] [talledLocalContainer] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.atlassian.bitbucket.web.conditions.IsLoggedInCondition': Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.bitbucket.auth.AuthenticationContext]: : No qualifying bean of type [com.atlassian.bitbucket.auth.AuthenticationContext] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.atlassian.bitbucket.auth.AuthenticationContext] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}

I will also note that i am using the newest way to do component imports, where as i have none in my atlassian-plugin.xml, and a limited number in "src/main/resources/META-INFO/atlassian-plugins-components-imports.xml"

I see com.atlassian.bitbucket.auth.AuthenticationContext, not sure how that fits in..

1 answer

1 accepted

1 vote
Sam Hall Community Champion Apr 04, 2017

HI Dana - since this is development related, you might want to try asking this over at: https://community.developer.atlassian.com as well if you haven't already.

Hoepfully someone over there will be able to help.

Oh..  still trying to understand the changes with this relaunch, didn't know it was split out to a developer side of things. 

Don't suppose I can move it, I'll have re-cross post

 

Thanks!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

29,307 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you