Skip to content

Administrator model customization #3399

@mdibaiee

Description

@mdibaiee

Describe the bug
Currently it seems it's not possible to create relations with the Administrator model (one-way).

An example use case:
We have a plugin in which we want to create new entities of a certain type, but we also want to know which administrator created them, so we would like to save a relationship between this entity and administrator. This can be a one-way relationship, but it seems even that is not possible.

Steps to reproduce the behavior

  1. Create a model
  2. Create a relationship with administrator:
"created_by": {
  "model": "administrator",
  "plugin": "admin"
}
  1. Run project
  2. See error

Expected behavior
Ability to create relationships (even if one-way) to administrator

Screenshots
N/A

Code snippets
N/A

System

  • Node.js version: v10.2.1
  • NPM version: 5.6.0
  • Strapi version: 3.0.0-beta.2
  • Database: PostgreSQL
  • Operating system: Archlinux

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue: feature requestIssue suggesting a new featureseverity: lowIf the issue only affects a very niche base of users and an easily implemented workaround can solve

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions