# Create a role

> Create a new role — name, optional role template, permissions in the permissions tree and the screen catalog; the role is saved in a single step.

URL: https://erpdocs.corexlogic.com/en/yonetim/islemler/rol-olusturma

- **Type:** Task
- **Module:** Administration
- **Menu path:** Yönetim › Kullanıcı ve Roller › Roller (Administration › Users and Roles › Roles)
- **Screen route:** `/roles`
- **Required permission:** `roles.create`
- **Prerequisites:**
  - It is clear which tasks the role will perform. Predefined roles and recipes: [Role examples](https://erpdocs.corexlogic.com/en/yonetim/rol-ornekleri).

A role is the name of a set of permissions that are granted to users together. You design the role once and assign it
to many people; when the role's permissions change, everyone who holds the role is affected.

## Steps

1. Open the **Yönetim › Kullanıcı ve Roller › Roller** (Administration › Users and Roles › Roles) screen and click the **Yeni Rol** (New Role) button.
   <!-- action: navigate · target: "/roles" · expect: "The Yeni Rol (New Role) window, Rol Özellikleri (Role Properties) tab" -->
2. Enter the role's name in the **Rol adı** (Role name) field. The name cannot be changed later.
   <!-- action: fill · target: "Rol adı" · value: "Demo — Satış Temsilcisi" -->
3. If you want to start from a predefined role, select the template from the **Rol şablonu** (Role template) list (e.g. **Satış Temsilcisi · Eleman** (Sales Representative · Staff)). The permissions and screens are filled from the template; **Kapsam (yazma)** (Scope (write)) shows the write modules. To start from scratch, leave **Şablonsuz — yetkileri elle seç** (No template — select permissions manually).
   <!-- action: select · target: "Rol şablonu" · value: "Satış Temsilcisi · Eleman" -->

   ![New Role — properties and template](https://erpdocs.corexlogic.com/en/en/img/screens/yonetim/rol-yeni.png)
   1. Role name — cannot be changed later
   2. Role template — starting permissions
   3. Scope — modules the role writes in
   4. Permissions and Screens tabs
   5. Create Role

4. Switch to the **Yetkiler** (Permissions) tab. Type a fragment without Turkish characters in the search box (**Ara… (modül, sayfa ya da işlem)** — Search… (module, page or action)), e.g. `siparis`; the matching branches open.
   <!-- action: open · target: "Yetkiler" · value: "siparis" -->
5. Check the boxes of the permissions to be granted and uncheck those not to be granted. A module or page box selects all the permissions below it together. Example: uncheck **Satış Siparişleri · Kapat** (Sales Orders · Close).
   <!-- action: choose · target: "Satış Siparişleri · Kapat" -->

   ![Role — permission tree](https://erpdocs.corexlogic.com/en/en/img/screens/yonetim/rol-yetkiler.png)
   1. Granted / total permissions
   2. Search — module, page or action
   3. Module — ticks all at once
   4. Action — a single permission
   5. Permission not granted in this role
   6. Read Only — keeps only View permissions

6. On the **Ekranlar** (Screens) tab, check the screens that will appear in the menu. The screens of the resources you granted write permission for are checked automatically; if any are missing, click **Yazdığı Ekranları İşaretle** (Mark the Screens It Writes To).
   <!-- action: open · target: "Ekranlar" -->

   ![Role — Screens (menu catalog)](https://erpdocs.corexlogic.com/en/en/img/screens/yonetim/rol-ekranlar.png)
   1. All screens — every permitted screen in the menu
   2. Adds screens the role writes to
   3. Area › section › screen — shown in the menu
   4. Selected / total screens

7. Click **Rolü Oluştur** (Create Role).
   <!-- action: click · target: "Rolü Oluştur" · expect: "The window closes; the role is in the list, with the area "Kurumun rolleri" (Organization's roles)" -->

**Result:** The role is saved and appears in the **Roller** (Roles) list (the permission count in the **İzin** (Permissions) column). To assign the role to users: [Assign a role to a user](https://erpdocs.corexlogic.com/en/yonetim/islemler/kullaniciya-rol-atama).

## What you need to know

- **A role created from a template is not bound to the template.** All of its permissions can be changed; a release
  upgrade does not add permissions to this role. The predefined role itself, however, is bound to the template, and the
  template's permissions are locked.
- **Starting from an existing role:** the role's **İşlemler › Kopyala** (Actions › Copy) in the list opens the new role
  window with the role's permissions and screens ("… rolünün N izniyle başlar; ad verip izinleri daraltın." — Starts
  with the N permissions of the … role; give it a name and narrow the permissions.).
- The **Salt Okunur** (Read-Only) button reduces the selection to **Görüntüle** (View) permissions only; it is a quick
  start for a read-only role.
- If the role was created but the permissions could not be saved: "'…' rolü oluşturuldu ancak izinleri kaydedilemedi.
  Rolü listeden açıp izinleri yeniden deneyebilirsiniz." (The role '…' was created but its permissions could not be
  saved. You can open the role from the list and try the permissions again.)
- If a role with the same name exists: "'…' adında bir rol zaten var." (A role named '…' already exists.) If the name is
  empty: "Rol adı zorunlu." (Role name is required.)
- The Screens tab does not grant permissions: a screen without permission does not appear in the menu even if it is
  checked in the catalog.
- In this release, the search in the tree does not match terms with Turkish characters ("sipariş" → "Eşleşen izin yok."
  — No matching permission.); use a fragment without such characters.

## Related

- [Roles screen](https://erpdocs.corexlogic.com/en/yonetim/ekranlar/roller)
- [Change a role's permissions](https://erpdocs.corexlogic.com/en/yonetim/islemler/rol-yetkilerini-duzenleme)
- [Permission model](https://erpdocs.corexlogic.com/en/yonetim/yetki-modeli)
- [Permission list](https://erpdocs.corexlogic.com/en/yonetim/izin-listesi)
