congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ResourceContext.isProjectFunctionGranted
Code IndexAdd Tabnine to your IDE (free)

How to use
isProjectFunctionGranted
method
in
net.nemerosa.ontrack.ui.resource.ResourceContext

Best Java code snippets using net.nemerosa.ontrack.ui.resource.ResourceContext.isProjectFunctionGranted (Showing top 4 results out of 315)

origin: net.nemerosa.ontrack/ontrack-ui-support

public static <T extends ProjectEntity, P extends ProjectFunction> BiPredicate<T, ResourceContext> withProjectFn(Class<P> projectFn) {
  return (T e, ResourceContext resourceContext) -> resourceContext.isProjectFunctionGranted(e, projectFn);
}
origin: net.nemerosa.ontrack/ontrack-ui-support

/**
 * Checks if the <code>fn</code> function is granted for the current user
 * for the <code>projectEntity</code>'s project.
 */
default boolean isProjectFunctionGranted(ProjectEntity projectEntity, Class<? extends ProjectFunction> fn) {
  return isProjectFunctionGranted(projectEntity.projectId(), fn);
}
origin: net.nemerosa.ontrack/ontrack-extension-svn

@Override
public List<LinkDefinition<Branch>> getLinkDefinitions() {
  return Collections.singletonList(
      LinkDefinitions.link(
          "_download",
          branch -> MvcUriComponentsBuilder.on(SVNController.class).download(
              branch.getId(), ""
          ),
          (branch, rc) -> rc.isProjectFunctionGranted(branch, ProjectConfig.class) &&
              svnService.getSVNRepository(branch).isPresent()
      )
  );
}
origin: net.nemerosa.ontrack/ontrack-extension-svn

@Override
public List<LinkDefinition<Build>> getLinkDefinitions() {
  return Arrays.asList(
      LinkDefinitions.link(
          "_changeLog",
          build -> {
            BuildDiffRequest request = new BuildDiffRequest();
            request.setFrom(build.getId());
            return MvcUriComponentsBuilder.on(SVNController.class).changeLog(request);
          },
          (build, rc) -> rc.isProjectFunctionGranted(build, ProjectView.class) &&
              svnService.getSVNRepository(build.getBranch()).isPresent()
      ),
      LinkDefinitions.page(
          "_changeLogPage",
          (build, resourceContext) -> resourceContext.isProjectFunctionGranted(build, ProjectView.class) &&
              svnService.getSVNRepository(build.getBranch()).isPresent(),
          "extension/svn/changelog"
      )
  );
}
net.nemerosa.ontrack.ui.resourceResourceContextisProjectFunctionGranted

Javadoc

Checks if the fn function is granted for the current user for the projectId project.

Popular methods of ResourceContext

  • links
    Gets a builder for links
  • isGlobalFunctionGranted
    Checks if the fn function is granted for the current user.

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • putExtra (Intent)
  • setContentView (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JPanel (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now