Package org.olat.core.id

Examples of org.olat.core.id.Roles


   */
  public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl,
      UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    Controller controller;
    // Do not allow guests to send anonymous emails
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
      Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
      String title = trans.translate("guestnoaccess.title");
      String message = trans.translate("guestnoaccess.message");
      controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
View Full Code Here


  public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl,
      UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller controller;
    // Do not allow guests to start tests
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
      Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
      String title = trans.translate("guestnoaccess.title");
      String message = trans.translate("guestnoaccess.message");
      controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
View Full Code Here

   */
  ExtendedIdentitiesTableDataModel(UserRequest ureq, List identities, boolean actionEnabled) {
    super(identities);
    this.actionEnabled = actionEnabled;

    Roles roles = ureq.getUserSession().getRoles();
    boolean isAdministrativeUser = (roles.isAuthor() || roles.isGroupManager() || roles.isUserManager() || roles.isOLATAdmin());
    userPropertyHandlers = UserManager.getInstance().getUserPropertyHandlersFor(usageIdentifyer, isAdministrativeUser);
  }
View Full Code Here

   * Set the roles (admin, author, guest)
   * @param identity
   * @param usess
   */
  private static void setRolesFor(Identity identity, UserSession usess) {
    Roles roles = ManagerFactory.getManager().getRoles(identity);
    usess.setRoles(roles);
  }
View Full Code Here

      List<Identity> selectedIdentities = (List<Identity>) getFromRunContext("identitiesToEdit");
      HashMap<String, String> attributeChangeMap = (HashMap<String, String>) getFromRunContext("attributeChangeMap");
      HashMap<String, String> roleChangeMap = (HashMap<String, String>) getFromRunContext("roleChangeMap");

      Roles roles = ureq.getUserSession().getRoles();
      boolean isAdministrativeUser = (roles.isAuthor() || roles.isGroupManager() || roles.isUserManager() || roles.isOLATAdmin());
      userPropertyHandlers = UserManager.getInstance().getUserPropertyHandlersFor(usageIdentifyer, isAdministrativeUser);

      String[] securityGroups = { Constants.GROUP_USERMANAGERS, Constants.GROUP_GROUPMANAGERS, Constants.GROUP_AUTHORS,
          Constants.GROUP_ADMIN };
View Full Code Here

      WindowControl wControl, ControllerEventListener tableEventListener, String actionCommand) {
    Locale loc = ureq.getLocale();
    Translator trans = new PackageTranslator(PACKAGE, loc);
    trans = UserManager.getInstance().getPropertyHandlerTranslator(trans);
    TableController tableCtr = new TableController(tableConfig, ureq, wControl, trans, tableEventListener);
    Roles roles = ureq.getUserSession().getRoles();
    boolean isAdministrativeUser = (roles.isAuthor() || roles.isGroupManager() || roles.isUserManager() || roles.isOLATAdmin());
    UserTableDataModel userDataModel = new UserTableDataModel(identities, loc, isAdministrativeUser);
    userDataModel.addColumnDescriptors(tableCtr, actionCommand);
    tableCtr.setTableDataModel(userDataModel);
    return tableCtr;
  }
View Full Code Here

      UserRequest ureq, WindowControl wControl,
      UserCourseEnvironment userCourseEnv, NodeEvaluation ne,
      String nodecmd) {
    Controller controller;
    // Do not allow guests to enroll to dates
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
      Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
      String title = trans.translate("guestnoaccess.title");
      String message = trans.translate("guestnoaccess.message");
      controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
View Full Code Here

  public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl,
      UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller controller;
    // Do not allow guests to access tasks
    Roles roles = ureq.getUserSession().getRoles();
    if (roles.isGuestOnly()) {
      Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
      String title = trans.translate(NLS_GUESTNOACCESS_TITLE);
      String message = trans.translate(NLS_GUESTNOACCESS_MESSAGE);
      controller = MessageUIFactory.createInfoMessage(ureq, wControl, title, message);
    } else {
View Full Code Here

    /*
     * TODO:pb:is ImsRepositoryResolver the right place for getting the change log?
     */
    RepositoryEntry re = courseNode.getReferencedRepositoryEntry();
    //re could be null, but if we are here it should not be null!
    Roles userRoles = ureq.getUserSession().getRoles();
    boolean showAll = false;
    showAll = userRoles.isAuthor() || userRoles.isOLATAdmin();
    //get changelog
    Formatter formatter = Formatter.getInstance(ureq.getLocale());
    ImsRepositoryResolver resolver = new ImsRepositoryResolver(re.getKey());
    QTIChangeLogMessage[] qtiChangeLog = resolver.getDocumentChangeLog();
    StringBuilder qtiChangelog = new StringBuilder();
View Full Code Here

    boolean isGroupManager = isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_GROUPMANAGER);
    boolean isUserManager = isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_USERMANAGER);
    boolean isGuestOnly = isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_HASROLE, Constants.ORESOURCE_GUESTONLY);
    boolean isInstitutionalResourceManager = isIdentityPermittedOnResourceable(identity, Constants.PERMISSION_HASROLE,
        Constants.ORESOURCE_INSTORESMANAGER);
    Roles roles = new Roles(isAdmin, isUserManager, isGroupManager, isAuthor, isGuestOnly, isInstitutionalResourceManager);
    return roles;
  }
View Full Code Here

TOP

Related Classes of org.olat.core.id.Roles

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.