On 04/18/2016 06:03 AM, abtv wrote:
> I received the following error:
> 2016-04-18 12:46:11,599 [main] ERROR .o.i.DefaultObservationManager - Failed
> to lookup listeners 
> org.xwiki.component.manager.ComponentLookupException: Failed to lookup
> component [role = [interface org.xwiki.observation.EventListener] hint =
> [default]]
> 
> I implemented the following component:
> 
> @Component
> @Named("MyAuthorizationSettler")
> @Singleton
> public class MyAuthorizationSettler implements AuthorizationSettler {
> 
>     @Override
>     public SecurityAccessEntry settle(UserSecurityReference
> userSecurityReference, Collection<GroupSecurityReference> collection,
> Deque<SecurityRuleEntry> deque) {
>         System.out.println("settle");
>         System.out.println("name");
>         System.out.println(userSecurityReference.getName());
>         System.out.println("space name");
>        
> System.out.println(userSecurityReference.getOriginalReference().getLastSpaceReference().getName());
> 
>         return new SecurityAccessEntry() {
>             @Override
>             public UserSecurityReference getUserReference() {
>                 return userSecurityReference;
>             }
> 
>             @Override
>             public SecurityAccess getAccess() {
>                 return null;
>             }
> 
>             @Override
>             public SecurityReference getReference() {
>                 return null;
>             }
>         };
>     }
> }
> 
> I added the folowing line 
> 0:com.raven.xwiki.auth.RavenAuthorizationSettler 
> to components.txt file. 
> 
> Then I added to xwiki.properties file the following line: 
> security.authorization.settler=com.raven.xwiki.auth.MyAuthorizationSettler
> 
> What should I need to implement else?
> 

Quick check, the code says "MyAuthorizationSettler" but the
configuration says "RavenAuthorizationSettler". Is that wrong in the
email only, or in the actual code?

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to