WorkLifeBeyond Role helper for Android

  • Latest version:

Install

Download:

Via Gradle

  • in root project

      allprojects {
        repositories {
          ...
          maven { url 'https://jitpack.io' }
        }
      }
    
  • in app level:

      dependencies {
              implementation 'com.github.worklifebeyond:wlb-role-helper-android:<latest_version>'
      }

    Usage

    // get global roles
    ArrayList<String> globalRoles =  WlbRoleHelper.getGlobalRoles("111"));
    
    // ["student", "instructor", "organization"]
    
    // get organization roles
    ArrayList<String> orgRoles =  WlbRoleHelper.getOrgRoles("00010000"));
    
    // ["organization-hr-admin"]
    
    if(orgRoles.get(0).equals(Roles.ORGANIZATION_HR_ADMIN)){
      // true
    }

    See [Test](https://github.com/worklifebeyond/wlb-role-helper- android/blob/master/wlbrolehelper/src/test/java/com/github/worklifebeyond/RoleUnitTest.java) for details.