Naviga Writer
6.3.3
6.3.3
  • Naviga Writer
  • Release notes
    • 6.3.3
    • 6.3.2
    • 6.3.1
    • 6.2.1
    • 6.2.0
    • 6.1.2
    • 6.1.1
    • 6.1.0
    • 6.0.0
    • 5.3.0
  • Introduction
    • Authoring
    • Developing
    • Publishing
    • User stories and reference cases
  • User Guide
    • Writer User Guide
      • The Content Area and Tabs
        • Help menu
        • Language menu
        • Article name
        • Writing teasers
        • Content area
        • Information
        • Search and replace words
        • History Button
        • Save and publish flow
        • Tabs
          • Meta Tab
            • Author
            • Channels
          • Integrations Tab
          • Image and Article search Tab
        • Locked article
      • Text management
      • Writer Keyboard Shortcuts
      • Personal Writer template
      • Channels to control access
      • Images User Guide
      • Common questions when starting using Writer
  • Admin Guide
    • Configuration files
    • Configurations Guide
    • Configuration of Writer templates
    • Publish Flow
      • Default configuration definitions
      • Starting part of the configuration
      • Publish flow config details
      • Configuration of calendarLocale
      • Preconditions for roles in the publish flow
    • Generic properties for Objects
      • Generic properties configuration
    • Image Services
      • Photo uploader
      • Binary Service Light
      • ImEngine
      • Imgix
    • Available Plugins
      • Naviga developed plugins
        • Plugins in earlier versions of Writer
      • Third-party plugins
  • Developer guide
    • Writer plugin development
      • Quickstart
      • Plugin overview
      • Creating an content object plugin
      • Validation and hooks
      • Interacting with external resources
    • Writer Plugin Building Blocks
      • Package
      • Component
      • Node
      • Converter
      • Events
    • Writer plugin style guide
      • CSS Guidelines
      • CSS variables, colors and fonts
      • UI Components
    • Tutorials
      • Popover & text analysis
      • Search & replace
      • Concept interaction
    • Infomaker NewsML
      • Overview
      • Document relations and types
      • Extensions XSD
      • NewsItem
      • ConceptItem
      • PlanningItem
      • Examples
        • NewsItem - Text
        • NewsItem - Picture
        • NewsItem - PDF
        • ConceptItem - Author
        • ConceptItem - Category
        • ConceptItem - Channel
        • ConceptItem - Content Profile
        • ConceptItem - Event
        • ConceptItem - Organisation
        • ConceptItem - Person
        • ConceptItem - Place (point)](point)](point)](point)](point)](point)](point)](point)](point)](point)]
        • ConceptItem - Place (polygon)](polygon)](polygon)](polygon)](polygon)](polygon)](polygon)](polygon)]
        • ConceptItem - Section
        • ConceptItem - Story
        • ConceptItem - Topic
        • PlanningItem
    • Media Enrichment
      • Images
  • API Reference
    • Writer Api
      • Api
      • Article
      • Browser
      • Concept
      • ConceptService
      • Document
      • Events
      • NewsItem
      • Router
      • Ui
      • Upload
      • User
      • settings
    • UI Components
      • UIAvatar
      • UIButton
      • UIByline
      • UICheckbox
      • UIChip
      • UIDatePicker
      • UIDatetimeFieldEditor
      • UIDropdown
      • UIFieldEditor
      • UIIconButton
      • UIInlineImage
      • UIPagination
      • UISelect
      • UITimePicker
      • UIToggle
      • UITooltip
      • UIInputText
      • UITextarea
Powered by GitBook
On this page
  • hasPermission(permission) ⇒ Boolean
  • Parameters
  • Example
  • hasUserPermission() ⇒ boolean
  • Example
  • hasPowerUserPermission() ⇒ boolean
  • Example
  • hasAdminPermission() ⇒ boolean
  • Example
  • getUserInfo() ></code>
  • logout() ⇒ void

Was this helpful?

  1. API Reference
  2. Writer Api

User

User class handles the authenticated user

Returns: Object | Object - User details

hasPermission(permission) ⇒ Boolean

Check if current user has a specific access permission

Available permissions are (more permissions may come in the future as the need for granularity grows):

Role with permissions (Permissions are inherited down the line, which means that an `AdminUser` also has `group/powerUser` and `group/user` etc)
ReadOnly:
- writer:access
- writer:group/readOnly
User:
- writer:group/user
PowerUser:
- writer:group/powerUser
AdminUser:
- writer:group/admin

Returns: Boolean - exists

Parameters

Param

Type

Description

permission

String

Required - Permission to look for in users permissions

Example

if (writer.api.user.hasPermission('writer:group/admin')) {
   // Do stuff
}

hasUserPermission() ⇒ boolean

Convinience method to find out if current user is a "user"

Returns: boolean - If user is "user"

Example

if (writer.api.user.hasUserPermission()) {
   // Do stuff
}

hasPowerUserPermission() ⇒ boolean

Convinience method to find out if current user is a "power user"

Returns: boolean - If user is "power user"

Example

if (writer.api.user.hasPowerUserPermission()) {
   // Do stuff
}

hasAdminPermission() ⇒ boolean

Convinience method to find out if current user is an "admin user"

Returns: boolean - If user is "admin"

Example

if (writer.api.user.hasAdminPermission()) {
   // Do stuff
}

getUserInfo() ></code>

Get current logged in user info object. Object contains info about current user, organisation, selected unit and permissions

Returns: Promise.<{given_name:String, family_name:String, email:String, picture:String, org:String, unit: String, permissions: Array}> - User details

logout() ⇒ void

Logout current user and reload page to trigger new login flow

PreviousUploadNextsettings

Last updated 5 years ago

Was this helpful?