use of jetbrains.buildServer.server.graphql.model.GlobalPermissions in project teamcity-rest by JetBrains.
the class Query method globalPermissions.
@NotNull
public GlobalPermissions globalPermissions(@NotNull DataFetchingEnvironment env) {
GraphQLContext ctx = env.getContext();
SUser user = ctx.getUser();
if (user == null) {
return new GlobalPermissions(false);
}
return new GlobalPermissions(user.getGlobalPermissions().contains(Permission.MANAGE_AGENT_POOLS));
}
Aggregations