kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
63 stars 63 forks source link

User management is broken #1591

Closed KnutLohse closed 5 years ago

KnutLohse commented 6 years ago

Kitodo 3.0.0-alpha.2 bug

1) Logged in as 'testAdmin', try to add user, got empty user list after that

After some debugging I call

curl http://localhost:9200/kitodo/user/_search?pretty=true&from=0&size=10

response:

{
  "took" : 28,
  "timed_out" : false,
  "_shards" : {
    "total" : 5,
    "successful" : 5,
    "skipped" : 0,
    "failed" : 0
  },
  "hits" : {
    "total" : 1,
    "max_score" : 1.0,
    "hits" : [
      {
        "_index" : "kitodo",
        "_type" : "user",
        "_id" : "7",
        "_score" : 1.0,
        "_source" : {
          "name" : "Lohse",
           "surname" : "Knut",
          "login" : "b-kl101",
          "ldapLogin" : "",
          "active" : true,
          "location" : "SBB",
          "metadataLanguage" : "de",
          "userGroups" : [ ],
          "filters" : [ ],
          "projects" : [ ],
          "processingTasks" : [ ],
          "tasks" : [ ]
        }
      }
    ]
  }
}

That shows: user was created, but isn't shown in list of users.

BTW: user management as elasticsearch entry? What's the benefit?

2) Trying to add another user and nothing happens or I got an empty (!) red error label.

catalina.out reports:

[ERROR] 2018-06-19 13:06:06.231 [http-nio-8080-exec-7] Helper - java.util.MissingResourceException: Can't find bundle for base name messages, locale de
[ERROR] 2018-06-19 13:06:06.233 [http-nio-8080-exec-7] Helper - java.util.MissingResourceException: Can't find bundle for base name messages, locale en
beatrycze-volk commented 6 years ago

Ad. 2 Error appears because directory defined in localMessages property (kitodo_config.properties) doesn't exist. Application will work without this, but as fix you can also create your own local directory for messages on copy there messages files (messages_de.properties and messages_en.properties).

As reference you can look to the Helper class - private static void loadMsgs() - line 383.

KnutLohse commented 6 years ago

NOPE - I followed your advices, but same behavior. Additional: it seems, that the first click to 'Save' is effectless.

Erikmitk commented 5 years ago

Sorry I'm late to this.

This has nothing to do with the localization. My guess is that the mapping of the ES index was not correct. Did you set it up via a CURL command or per Kitodo.Production itself? The CURL way leads to problems and this has been changed in the meantime and the documentation has been adopted. We had this discussion here https://github.com/kitodo/kitodo-production/pull/1834 because I ran into a similar issue. We weren't aware of this problem when you opened the issue.