Package net.webpasswordsafe.common.model

Examples of net.webpasswordsafe.common.model.Permission


    {
        if (clientSessionUtil.isAuthorized(Function.ADD_PASSWORD))
        {
            Password newPassword = new Password();
            newPassword.setMaxEffectiveAccessLevel(AccessLevel.GRANT);
            newPassword.addPermission(new Permission(clientSessionUtil.getLoggedInUser(), AccessLevel.GRANT));
            new PasswordDialog(newPassword, passwordSearchPanel).show();
        }
        else
        {
            MessageBox.alert(textMessages.error(), textMessages.notAuthorized(), null);
View Full Code Here


   
    private void applyTemplateDetails(Template template)
    {
        for (TemplateDetail templateDetail : template.getTemplateDetails())
        {
            permissionStore.add(new PermissionData(new Permission(templateDetail.getSubject(), templateDetail.getAccessLevelObj())));
        }
    }
View Full Code Here

    private void doAdd()
    {
        SubjectData data = comboSubjects.getValue();
        if (null != data)
        {
            permissionStore.add(new PermissionData(new Permission((Subject)data.get(Constants.SUBJECT), AccessLevel.READ)));
        }
    }
View Full Code Here

        if (permissionStore.getCount() > 0)
        {
            Set<Permission> permissions = new HashSet<Permission>(permissionStore.getCount());
            for (PermissionData data : permissionStore.getModels())
            {
                Permission permission = (Permission)data.get(Constants.PERMISSION);
                String newAccessLevel = ((AccessLevel)data.get(Constants.ACCESSLEVEL)).name();
                if (!newAccessLevel.equals(permission.getAccessLevel()))
                {
                    // if user changed the access level value in the GUI, treat it like a new permission
                    permission = new Permission(permission.getSubject(), AccessLevel.valueOf(newAccessLevel));
                }
                permissions.add(permission);
            }
            permissionListener.doPermissionsChanged(permissions);
            hide();
View Full Code Here

                password.addPasswordData(passwordDataItem);
                password.setNotes(Utils.safeString(passwordMap.get("notes")));
                password.setMaxHistory(-1);
                String active = Utils.safeString(passwordMap.get("active")).toLowerCase();
                password.setActive(active.equals("") || active.equals("true") || active.equals("yes") || active.equals("y"));
                password.addPermission(new Permission(loggedInUser, AccessLevel.GRANT));
                password.addTagsAsString(Utils.safeString(passwordMap.get("tags")));
                if (passwordService.isPasswordTaken(password.getName(), password.getUsername(), password.getId()))
                {
                    message = "Password title and username already exists";
                }
View Full Code Here

TOP

Related Classes of net.webpasswordsafe.common.model.Permission

Copyright © 2018 www.massapicom. 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.