Package org.sonar.core.permission

Examples of org.sonar.core.permission.PermissionQuery.membership()


    verify(finder).findUsersWithPermission(argumentCaptor.capture());

    PermissionQuery query = argumentCaptor.getValue();
    assertThat(query.component()).isEqualTo("org.sample.Sample");
    assertThat(query.permission()).isEqualTo("user");
    assertThat(query.membership()).isEqualTo(PermissionQuery.ANY);
  }

  @Test
  public void find_groups_with_permissions() throws Exception {
    service.findGroupsWithPermission(ImmutableMap.<String, Object>of(
View Full Code Here


    verify(finder).findGroupsWithPermission(argumentCaptor.capture());

    PermissionQuery query = argumentCaptor.getValue();
    assertThat(query.component()).isEqualTo("org.sample.Sample");
    assertThat(query.permission()).isEqualTo("admin");
    assertThat(query.membership()).isEqualTo(PermissionQuery.ANY);
  }

  @Test
  public void add_global_user_permission() throws Exception {
    params = buildPermissionChangeParams("user", null, GlobalPermissions.DASHBOARD_SHARING);
View Full Code Here

    assertThat(query.component()).isEqualTo("org.sample.Sample");
    assertThat(query.template()).isEqualTo("my_template_key");
    assertThat(query.search()).isEqualTo("text");
    assertThat(query.pageSize()).isEqualTo(50);
    assertThat(query.pageIndex()).isEqualTo(2);
    assertThat(query.membership()).isEqualTo(PermissionQuery.ANY);
  }

  @Test
  public void to_query_with_include_membership_parameter() throws Exception {
    Map<String, Object> params = newHashMap();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.