Examples of checkPermission()


Examples of de.iritgo.aktera.ui.form.CommandInfo.checkPermission()

      outList.setAttribute("embedded", "Y");
    }
    outList.setAttribute("commandStyle", listing.getCommandStyle());

    CommandInfo viewCommand = listing.getCommand(ListingDescriptor.COMMAND_VIEW);
    if (viewCommand != null && viewCommand.checkPermission(request))
    {
      Command cmd = viewCommand.createCommand(request, response, context);

      cmd.setName(outList.getName() + "CmdEdit");
      cmd.setLabel(viewCommand.getLabel() != null ? viewCommand.getLabel() : "edit");
View Full Code Here

Examples of gabriel.acl.Acl.checkPermission()

        "            PP2 { PM1 }";

    Acl acl = manager.parse(owner, name, new StringReader(source));

    assertEquals("PP1 has PM1",
        1, acl.checkPermission(new Principal("PP1"), new Permission("PM1")));
    assertEquals("PP1 has PM2",
        1, acl.checkPermission(new Principal("PP1"), new Permission("PM2")));
    assertEquals("PP1 has PM3",
        1, acl.checkPermission(new Principal("PP1"), new Permission("PM3")));
    assertEquals("PP2 has PM1",
View Full Code Here

Examples of hudson.model.AbstractProject.checkPermission()

            throw new AbortException("This command can be only invoked from a build executing inside Hudson");

        AbstractProject p = Jenkins.getInstance().getItemByFullName(id.job, AbstractProject.class);
        if (p==null)
            throw new AbortException("No such job found: "+id.job);
        p.checkPermission(Item.CONFIGURE);

        List<String> toolTypes = new ArrayList<String>();
        for (ToolDescriptor<?> d : ToolInstallation.all()) {
            toolTypes.add(d.getDisplayName());
            if (d.getDisplayName().equals(toolType)) {
View Full Code Here

Examples of hudson.model.Hudson.checkPermission()

    @Option(name="-restart",usage="Restart Hudson upon successful installation")
    public boolean restart;

    protected int run() throws Exception {
        Hudson h = Hudson.getInstance();
        h.checkPermission(Hudson.ADMINISTER);

        for (String source : sources) {
            // is this a file?
            FilePath f = new FilePath(channel, source);
            if (f.exists()) {
View Full Code Here

Examples of hudson.model.Run.checkPermission()

    @Argument(metaVar="DESCRIPTION",required=true,usage="Description to be set. '=' to read from stdin.", index=2)
    public String description;

    protected int run() throws Exception {
      Run run = job.getBuildByNumber(number);
        run.checkPermission(Run.UPDATE);

        if ("=".equals(description)) {
          description = IOUtils.toString(stdin);
        }
       
View Full Code Here

Examples of hudson.security.AccessControlled.checkPermission()

    private static void checkPermissionForValidate() {
        AccessControlled subject = Stapler.getCurrentRequest().findAncestorObject(AbstractProject.class);
        if (subject == null)
            Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
        else
            subject.checkPermission(Item.CONFIGURE);
    }

    /**
     * A convenience method over {@link #validateRelativePath(String, boolean, boolean)}.
     */
 
View Full Code Here

Examples of java.lang.SecurityManager.checkPermission()

        SecurityManager sm = System.getSecurityManager();
        if (sm != null) {
      if(_logger.isLoggable(Level.FINE)){
          _logger.fine("permission check done to set SecurityContext");
      }
      sm.checkPermission(doAsPrivilegedPerm);
        }
         permitted = true;
     } catch (java.lang.SecurityException se) {
         _logger.log(Level.SEVERE, "java_security.security_context_permission_exception", se);
     } catch (Throwable t) {
View Full Code Here

Examples of java.security.AccessControlContext.checkPermission()

            /**
             * JACC v1.0 secion 4.1.1
             */
            WebUserDataPermission wudp = new WebUserDataPermission(request);
            acc.checkPermission(wudp);

        } catch (AccessControlException ace) {
            response.sendError(Response.SC_FORBIDDEN);
            return false;
        }
View Full Code Here

Examples of java.security.AccessControlContext.checkPermission()

            AccessControlContext acc = ContextManager.getCurrentContext();

            /**
             * JACC v1.0 section 4.1.2
             */
            acc.checkPermission(new WebResourcePermission(request));

        } catch (AccessControlException ace) {
            response.sendError(Response.SC_FORBIDDEN);
            return false;
        }
View Full Code Here

Examples of java.security.AccessControlContext.checkPermission()

        try {
            /**
             * JACC v1.0 section 4.1.3
             */
            acc.checkPermission(new WebRoleRefPermission(name, role));
        } catch (AccessControlException e) {
            return false;
        }

        return true;
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.