Join the conversation

Sign in to join this conversation, and others like it, in the communities you care about.

Wekan

Wekan is an open-source kanban board (Trello like) which allows a card-based task and to-do management.

Wekan / Bugs

add user api ignores admin true parameter in body

add user api ignores admin true parameter in body

Wekan/Bugs · April 9, 2020 at 10:29pm

add user api ignores admin true parameter in body

Wekan / Bugs · April 9, 2020 at 10:29pm

Create a board with an owner. Owner is a member with admin: true.

Add a member and as per api set action to add and isadmin to true. Added member is not an admin.

ie: that new member added does not get the icon permiiting archiving a board when you hover over the board.

If you look in mongo you see an array of the two users, under the key Members

The first item in that array is the one added to the board at board creation time as the owner and isadmin is set to true

The second member of the two element mongo array for that board is the added user and isadmin is set to false

in Both cases no comment and comment only and worker are all set as false


April 9, 2020 at 10:40pm

Thanks :)

    • reply
    • like

    April 10, 2020 at 5:34pm

    OK well its deeper than that I guess

      • reply
      • like

      I just reset the isAdmin attribute for all members to true

        • reply
        • like

        in Mongo and waited till the screen refreshed

          • reply
          • like

          and it still does not permit the second member see the archive icon in the lower left of the board field when you hover over the board

            Edited
            • reply
            • like

            so either the isAdmin attribute is not being read for members,

              Edited
              • reply
              • like

              OR only the owner has archive/delete permission of that board

                • reply
                • like

                if so the api describes a string for an owner and an array for members

                  • reply
                  • like

                  is there a way to have multiple owners of a board?

                    • reply
                    • like

                    I mean the issue is three fold

                      • reply
                      • like

                      a) new members created with the api get a isAdmin as false even if you include a isAdmin as true in the add user/member to a board

                        • reply
                        • like

                        b) that if if you fix that and force isAdmin to true the second and later members do not get archive delete function (they may have permission but the GUI is not depicting the visual tools based on those permissions

                          • reply
                          • like

                          c) if member permissions never extend to members but only the owner for archive/delete functions that means that only the owner can remove a board.

                            • reply
                            • like

                            Though in many cases this may make sense, not being able to select this is more constraining then not getting PUT routines or webhooks for editing

                              Edited
                              • reply
                              • like

                              If you want me to test things LMK. Right now I have mongo routines that reset isAdmin and others that turn off allows statements to block edit functions that are not supported by webhooks.

                                • reply
                                • like

                                But I do not have a solution to not displaying icons for archive/delete or not overloading owner with atleast two users.

                                  • reply
                                  • like

                                  I have all that working just fine, so I can externally rename boards and swimlanes, change colors of swimlanes at creation or after the fact, changing board permission and user permissions, etc. So all that is good.

                                    • reply
                                    • like

                                    But this is the first time that the app GUI is not following the data in Mongo records

                                      • reply
                                      • like

                                      { "_id" : "6ymKB5c4sgiwpoWYP", "title" : "Stimulus III", "members" : [ { "userId" : "3bNniN3P6DMdi9ziT", "isAdmin" : true, "isActive" : true, "isNoComments" : false, "isCommentOnly" : false, "isWorker" : false }, { "userId" : "MvkLYjA9Gxk4QoBDc", "isAdmin" : true, "isActive" : true, "isNoComments" : false, "isCommentOnly" : false, "isWorker" : false } ], "permission" : "public", "color" : "wisteria", "slug" : "stimulus-iii", "archived" : false, "createdAt" : ISODate("2020-04-10T17:19:33.170Z"), "modifiedAt" : ISODate("2020-04-10T17:19:33.272Z"), "stars" : 0,

                                        • reply
                                        • like

                                        "labels" : [ { "color" : "green", "_id" : "Ej3Wxg", "name" : "" }, { "color" : "yellow", "_id" : "LpGxup", "name" : "" }, { "color" : "orange", "_id" : "PFm9GH", "name" : "" }, { "color" : "red", "_id" : "nQ5h9E", "name" : "" }, { "color" : "purple", "_id" : "3xvxDD", "name" : "" }, { "color" : "blue", "_id" : "JKqZoT", "name" : "" } ],

                                          • reply
                                          • like

                                          "subtasksDefaultBoardId" : null, "subtasksDefaultListId" : null, "dateSettingsDefaultBoardId" : null, "dateSettingsDefaultListId" : null, "allowsSubtasks" : false, "allowsAttachments" : false, "allowsChecklists" : false, "allowsComments" : false, "allowsDescriptionTitle" : true, "allowsDescriptionText" : true, "allowsActivities" : true, "allowsLabels" : true, "allowsAssignee" : false, "allowsMembers" : true, "allowsRequestedBy" : false, "allowsAssignedBy" : false, "allowsReceivedDate" : false, "allowsStartDate" : false, "allowsEndDate" : false, "allowsDueDate" : true, "presentParentTask" : "no-parent", "isOvertime" : false, "type" : "board" }

                                            • reply
                                            • like

                                            Hmm. Well, there is isBoardAdmin and isAdmin. Depends is user admin of board or Wekan.

                                              • reply
                                              • like

                                              I think only BoardAdmin can archive board, not Normal/CommentOnly/NoComments/Worker

                                                • reply
                                                • like

                                                Normally in Wekan web UI you can change each member to be BoardAdmin or some other permission

                                                  • reply
                                                  • like

                                                  I need to test and figure out what you mean

                                                    • reply
                                                    • like