Coder Social home page Coder Social logo

echocat / adam Goto Github PK

View Code? Open in Web Editor NEW
11.0 11.0 15.0 741 KB

Addon which enhances all user profiles of confluence. It also adds an advanced people directory. The whole addon is configurable by means of an XML, can be localized, supports Velocity templates and supports view and edit restrictions.

Home Page: https://adam.echocat.org

License: GNU Lesser General Public License v3.0

Java 94.88% CSS 1.32% JavaScript 3.41% Closure Templates 0.38%
adam addon confluence directory echocat ldap

adam's People

Contributors

blaubaer avatar feisley avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adam's Issues

Field type: Select

Could you please implement new field types single select (radio button array) and multi select (check box array), where admin could specify values and user could pick them? Values would support wiki mark-up.

Example of single select: Employee office - only one value from given options.
Example of multi select: Employee projects - employee can participate on multiple projects at the time.

Thank you!

Support for resolving DN based "manager" field

The manager field in the directory stores the DN of the users manager. The system could resolve this to a record using ".findEntityByDN()" and then allow the attributes of the user to be mapped to a field.

As an example use case:
LDAP Entry:
manager: cn=jsmith,ou=users,dc=example,dc=com
Mapped Entry:
Manager: John Smith (with link to /display/~jsmith in Confluence)

If this were a generic field type it would work for other attributes like "secretary" or possible custom DN based attributes.

Support pagination of user report

When the directory has a large number of users, rendering the report can produce a very large document and take longer to generate.

Optional/configurable pagination would allow the report to be delivered in more manageable chunks.

LDAP Synchronization Throws Exception

2014-03-25 19:21:15,692 WARN [http-8090-1] [echocat.adam.synchronization.LdapDirectorySynchronizationRequiredEventListener] handleLogin The user 'xxxxxxx could not be synchronized. This means that this user could be out of date.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.atlassian.crowd.directory.OpenLDAP$$Extension$$2': Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.crowd.search.ldap.LDAPQueryTranslater]: : No unique bean of type [com.atlassian.crowd.search.ldap.LDAPQueryTranslater] is defined: expected single matching bean but found 2: [crowdLdapQueryTranslator, activeDirectoryQueryTranslater]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.crowd.search.ldap.LDAPQueryTranslater] is defined: expected single matching bean but found 2: [crowdLdapQueryTranslator, activeDirectoryQueryTranslater]

Full Stack Trace:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.atlassian.crowd.directory.OpenLDAP$$Extension$$2': Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.crowd.search.ldap.LDAPQueryTranslater]: : No unique bean of type [com.atlassian.crowd.search.ldap.LDAPQueryTranslater] is defined: expected single matching bean but found 2: [crowdLdapQueryTranslator, activeDirectoryQueryTranslater]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.crowd.search.ldap.LDAPQueryTranslater] is defined: expected single matching bean but found 2: [crowdLdapQueryTranslator, activeDirectoryQueryTranslater]
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591)
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:300)
    at com.atlassian.confluence.user.crowd.ConfluenceSpringContextInstanceFactory.getInstance(ConfluenceSpringContextInstanceFactory.java:52)
    at com.atlassian.confluence.user.crowd.ConfluenceSpringContextInstanceFactory.getInstance(ConfluenceSpringContextInstanceFactory.java:43)
    at org.echocat.adam.directory.ExtendingLDAPDirectoryInstanceLoader.newRemoteDirectory(ExtendingLDAPDirectoryInstanceLoader.java:90)
    at org.echocat.adam.directory.ExtendingLDAPDirectoryInstanceLoader.getRawDirectory(ExtendingLDAPDirectoryInstanceLoader.java:77)
    at org.echocat.adam.directory.ExtendingLDAPDirectoryInstanceLoader.getDirectory(ExtendingLDAPDirectoryInstanceLoader.java:83)
    at org.echocat.adam.synchronization.LdapDirectorySynchronizer.findRemoteDirectoryOf(LdapDirectorySynchronizer.java:267)
    at org.echocat.adam.synchronization.LdapDirectorySynchronizer$3.nextIterator(LdapDirectorySynchronizer.java:170)
    at org.echocat.adam.synchronization.LdapDirectorySynchronizer$3.nextIterator(LdapDirectorySynchronizer.java:166)
    at org.echocat.jomon.runtime.iterators.ChainedIterator.hasNext(ChainedIterator.java:51)
    at org.echocat.jomon.runtime.iterators.ChainedIterator.hasNext(ChainedIterator.java:48)
    at org.echocat.jomon.runtime.iterators.IteratorUtils$4.computeNext(IteratorUtils.java:141)
    at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:141)
    at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:136)
    at org.echocat.jomon.runtime.iterators.IteratorUtils$3.hasNext(IteratorUtils.java:109)
    at org.echocat.adam.synchronization.LdapDirectorySynchronizer.synchronize(LdapDirectorySynchronizer.java:215)
    at org.echocat.adam.synchronization.LdapDirectorySynchronizer.synchronize(LdapDirectorySynchronizer.java:199)
    at org.echocat.adam.administration.AdministrationAction$1.run(AdministrationAction.java:81)
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.atlassian.crowd.search.ldap.LDAPQueryTranslater] is defined: expected single matching bean but found 2: [crowdLdapQueryTranslator, activeDirectoryQueryTranslater]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:621)
    at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:622)
    at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:584)
    ... 25 more

Custom user report hover popup

On the "All Users" report when you hover over an entry you see a popup like:
screenshot 2014-04-04 08 35 06

This gives you access to easily follow the user or jump to their personal space, etc.

It would be nice to be able to have this popup when using the custom reports as well

Element order in views

In the new views that were introduced in #20 the order of the elements/fields is dictated by the <profile> rather than the <view>

This presents a slight challenge: on one hand the <profile> allows for groups of elements to separate information logically. In this case it makes sense for <profile> to drive the ordering. However, for something like the "compact" view used for the hover profiles, it might be useful to be able to set the order in that view.

For example, in the sample configuration if we look at the fields Name, Email and Position. For the profile the order is Name, Email, grouped in Personal and Position grouped in Business. When we create a view for the hover, if we want to use the order: Name, Position, Email, this is not possible currently as the order is defined globally at <profile> and the <view> only controls visibility.

It may be worth considering changing <profile> to simply be the data definition only and <view> become the presentation definition. Thus we would move groups out of <profile> and into <view>

Improve style of user popup

As mentioned in #18 the changes made to allow configuration of the user popup doesn't look as clean as the original Confluence implementation.

Two suggestions:

  1. Remove the line break and wrap the fields around the profile image to avoid the large block of white space
  2. Remove the field titles as this is a small popup badge and the information presented within it should be obvious without labels (i.e. Name, Email, Phone, Title)

Create report-profiles macro

A marco that provides the same content like the people directory.

It also have to include the ability to provide a search filter.

For the first version we do not want to hide same columns from the reports. We only want to provide to select a report to be displayed.

People search broken

People search does not return any results.

  1. Go people
  2. Click Search box
  3. Try to filter some user - nothing is returned

With disabled plugin search works as expected.
1
2

User profile macro bug

When there is not enough space for User Profile macro, then macro start behaving weird

  • overlapping itself
  • overflows into wrong area

1

UserDetailsManager limits fields to 255 characters

The Confluence UserDetailsManager that stores the rendered profile fields is limited to 255 characters.

This results in truncated data if the directory contains more (or if the template results in more) than 255 characters.

Group filter does not allow : (colons)

Our groups are formed using colons to join the group path. Example:

employees:all
employees:us:all
employees:us:california

When attempting to use these groups in the filter an error is raised indicating a colon is not a valid character.
Example:

<includingGroup id="employees:all" />

Order of Elements in View

Currently it is not possible to set order of elements for each view independently. Sort order reflect order in which are elements defined. Ideally order of elements within the View in XML.

Thanks!

Store synchronized content in Active Objects

Currently the synchronized attributes are stored in Bandana which does not perform well as the amount of data stored grows. Atlassian's recommendation is to use Active Objects as it will perform better with larger datasets.

Employee count

Is there a way to display the total number of employees at the bottom of the page? Or add a column that starts with 1 and autoincrements?

Add HTML element type

Add a HTML element type so that the velocity template can return any HTML content without escaping. This will allow more customized formatting without the constraints of wiki markup. Examples include, image tags, javascript, and custom links.

Given the templates can only be edited by admins, this should not present a security concern.

Cannot rename internal users

When renaming a Internal User, we always run in to NullPointerException

Below's the error from the log file:

2015-02-12 08:46:32,722 DEBUG [ajp-bio-8009-exec-7] [net.sf.hibernate.SQL] log select confluence0_.user_key as user_key, confluence0_.username as username, confluence0_.lower_username as lower_us3_ from user_mapping confluence0_ where (confluence0_.lower_username=? )
2015-02-12 08:46:32,725 TRACE [ajp-bio-8009-exec-7] [sf.hibernate.type.StringType] nullSafeSet binding 'jrajchert' to parameter: 1
2015-02-12 08:46:32,731 ERROR [ajp-bio-8009-exec-7] [atlassian.confluence.servlet.ConfluenceServletDispatcher] sendError Could not execute action
 -- referer: https://confluence.artin.cz/admin/users/edituser.action?username=jrajchert | url: /admin/users/doedituser.action | userName: sysadmin
java.lang.NullPointerException

This issue cannot be replicated if we disabled the echocat Adam plugin

We noticed that the user profile's UI/field was different from the original design, could it be the cause?

Thank you

Regards,

Wayne Wong

Ability to filter reports dynamically

Currently the reports allow free text search via the UI. It would also be useful to allow field specific filters for dynamic reports.

A few examples:

browsepeople.action?report=employees&department=QA
browsepeople.action?report=employees&position=Engineer
browsepeople.action?report=employees&position=*Manager

which would match "Product Manager", "Engineering Manager" etc...

Feature request: Add Crowd support

reading and poking around brought me to a conclusion that Adam does not yet support Confluence instances hooked into Crowd or with multiple directories (internal + Crowd).

please consider adding Crowd support

Resaving Profiles

I found the problem.

  • User is not find by user search
  • View / edit permissions based on group do not work
  • User is not within the group

until his profile is resaved. For example when I will make report showing all employees, based on group employees (default settings), such report is empty even if there are users within the group. When I will resave the profile (no need to make change, just start edit and then save) then the user is finally shown in that report. It have to be made after each change. When there is user appearing corrently on report Employees and i will add him to admin group, he will not be shown on report based on admin group until his profile is resaved again.

Tested on Confluence 5.5.6 and 5.6.1 with internal directory or Crowd directory.

Field type: UserPicker

Could you please add new type of element for easy input if users. I would like to use it local Manager field. Currently i can use WikiMarkup field with syntax [~user], but it is not something what I would like to give to end-users.

Disabled users

It is possible to add disabled users to Reports? They are excluded from that by default. For example as an parameter of the Report?

Example

<report id="all" showActiveUsers="ture" showDisabledUsers="ture">
        <localization locale="en_US" title="All users" />
        <localization locale="de_DE" title="Alle Nutzer" />
        <access>
            <anonymous view="forbidden" />
            <default view="allowed" />
        </access>
 </report>

Then admin could define reports of Active, Disabled or both. Such overview might come handy when we want to someone re-hire or contact him from any other reason. Also brings some insight into fluctuation.

Then it would be great if such info could be present as an profile element. When someone is reviewing user profile it is not obvious if the user is active - another element could clarify it.

When i click user mentioned on Confluence page or shown as an author I can see this:
1
No idea if the user is active or not. Should I contact him?

Exception when clicking "Save and synchronize now"

The following exception occurs when Adam tries to sync:

Exception in thread "LDAP directory synchronization job" java.lang.LinkageError: loader constraint violation: when resolving field "LOG" the class loader (instance of org/apache/felix/framework/ModuleImpl$ModuleClassLoader) of the referring class, com/opensymphony/xwork/ActionSupport, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for the field's resolved type, port, have different Class objects for that type
    at org.echocat.adam.administration.AdministrationAction.access$100(AdministrationAction.java:37)
    at org.echocat.adam.administration.AdministrationAction$1.run(AdministrationAction.java:79)

Ability to sort columns

Provide the ability to sort the columns in the following ways:

  1. Allow the default sort to be selected in the configuration
  2. Allow the end user to dynamically re-sort the report by clicking on the column headers.

Fields visible in user profile macro should be configurable

Currently when including the user profile macro on a page, all fields are shown. It may be desirable for the user to display only a subset of fields on the macro and the rest be accessible from the profile page itself.

The visibility could be configured by a property as with #18

Popup for Adam Reports

My original intent with #18 was to show the popup when hovering over the links on the custom Adam report pages (i.e. "Employees"). Right now the popup is only visible on the default "All users" report.

thumbnailPhoto as avatar

The thumbnailPhoto field in AD has been used by Outlook 2010 onwards, and we already had it uploaded in AD.

It would really great to have this.

Gary

Support for multi-valued attributes

Provide support for mapping fields to multi-valued attributes in LDAP.

For example if a user has two "telephoneNumber" attributes you could show the following on their profile page:

Phone: xxxxx
Phone: yyyyy

Malformed compact view

In public places is compact view just fine. In administration it is deformed. Tester of confluence 5.5.6 and 5.6.1 (both unsupported I know)
01
02

Confluence mobile support

When viewing a user profile on the Confluence mobile interface, only the original builtin fields are shown (Position, Department, Location, About Me).

Are there hooks into the mobile UI to allow rendering of custom fields as well?

Username field

It is somehow possible show (system) username in vews or reports? It might be handy because as username could be used in other systems (i.e. Version control system)

Provide ability to sync fields back to LDAP directory

Give a user and admin the chance to edit fields in confluence (example mobile phone) and sync it back to the LDAP directory. In this case the administrators and users have a easy user interface to edit their data.

Cannot edit the "IM" field once Adam is enabled

When using the "Edit Profile" UI in Confluence, The "IM" field cannot be changed while Adam is enabled. You can modify the text but after clicking save it reverts to its previous value.

By comparison changing the "About Me" text works fine.

Profile replaces "Expertise" panel

When installed on an instance that also contains Confluence Questions the profile overwrites the Questions "Expertise" panel shown at the top right side of the profile page.

Is it possible to inject the custom profile without removing the "Expertise" panel? There must be some way to add panels to the profile page given that the "Expertise" panel itself was injected by the Confluence Questions plugin.

Adam breaks core people list pagination

When clicking next or on an explicit page number under "All users" the user is directed to the following url:
/browsepeople.action&startIndex=50

This produces a "Page Not Found" error:

screenshot 2014-04-03 18 28 46

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.