Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-17061

findSakaiPerson() is checking on value of locked, which may be null for old profile records

    XMLWordPrintable

    Details

    • Conversion Script Required:
      Yes
    • CLE Team Issue:
      Yes

      Description

      It seems at some point, the 'locked' field in profile was not set and is null in the database, but subsequently became set to 0 by default.

      However, a findSakaiPerson() call like this:

      final SakaiPerson example = sakaiPersonManager.getPrototype();
      example.setNormalizedMobile(numberRoutingHelper.normalizeNumber(mobileNumber));
      example.setTypeUuid(sakaiPersonManager.getUserMutableType().getUuid());
      final List<SakaiPerson> list = sakaiPersonManager.findSakaiPerson(example);

      will fail to return records where locked is null, as the constructors used for getPrototype() set locked = 0.

      A db conversion can fix this historical anomaly in profile records, viz.:

      update SAKAI_PERSON_T SET LOCKED=0 WHERE locked is null;

      but perhaps getPrototype() should also not check the locked value.

      It seems the legacy Profile tool uses the value of locked to determine whether users may edit their profile or not.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  steve.swinsburg Steve Swinsburg
                  Reporter:
                  smarquard Stephen Marquard
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration