GithubHelp home page GithubHelp logo

cockpit-hq / cockpit Goto Github PK

View Code? Open in Web Editor NEW
325.0 9.0 40.0 23.43 MB

Cockpit Core - Content Platform

Home Page: https://getcockpit.com

License: Other

PHP 65.19% JavaScript 24.33% CSS 10.41% Dockerfile 0.07%
cms headless-cms cockpit sqlite mongodb nosql api api-graphql api-rest graphql

cockpit's Introduction

Cockpit - Content Platform

cockpit banner

Requirements

  • PHP >= 8.2
  • PDO + SQLite (or MongoDB)
  • GD extension
  • mod_rewrite, mod_versions enabled (on apache)

make also sure that $_SERVER['DOCUMENT_ROOT'] exists and is set correctly.

Installation

  1. Download Cockpit and put the cockpit folder in the root of your web project
  2. Make sure that the /storage folder and all its subfolders are writable
  3. Go to /install via Browser
  4. You're ready to use Cockpit :-)

πŸ’ Partners

ginetta
We create websites and apps that click with users.

BrowserStack
Live, Web-Based Browser Testing

πŸ’ Sponsors

Backers on Open Collective Sponsors on Open Collective

Become a backer or sponsor through:

Thank you to all our backers! πŸ™

Copyright and license

Copyright since 2015 πŸ…°πŸ…ΆπŸ…΄πŸ…½πŸ†ƒπŸ…΄πŸ…ΉπŸ…Ύ under the MIT license.

See LICENSE for more information.

cockpit's People

Contributors

aheinze avatar deepsourcebot avatar faisalnjs avatar falk-m avatar filipmiik avatar isemog avatar jmleroux avatar nkfilis avatar raffaelj avatar remluben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cockpit's Issues

UI load time larger than previous version

Hello Arthur,

Somehow, the ui load time for v2 is little larger than earlier version. I see some assets are loaded from localhost, yet it takes as long as 5 seconds! My internet is quite good, so I don't expect a delay and subsequent fallback option to load from local resource if any.
image

Missing Feature for cockpit v2

Hello Artur, Is there any change this below missing feature coming to cockpit v2?

  1. Custom Sortable Entries for model collection ( tree + sortable )
  2. Custom Icon for model collection
  3. Multi select Assets like Gallery field in old cockpit? I know it can multi link assets but must one by one

Thank you for awesome work!

Christian

PHP 8.1 required

If I use the php:8.0-apache docker image, the following error appears:
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 8.0.26. in /var/www/html/lib/vendor/composer/platform_check.php on line 24
When I use the docker image php:8.1-apache everything works fine.

You should raise the requirement to PHP 8.1

Fatal error: Uncaught TypeError

Version: Cockpit Core

After installation, I got redirected to /auth/login?to=/. For me this was a blank page and the tab bar said: "Access denied!".
PHP 8.0 error was:
WhatsApp Image 2022-09-24 at 19 06 23

I fixed it myself by casting the return value in Line 57 (/lib/Lime/Helper/Utils.php) to int
image

I am not a PHP pro, so I don't know if I damaged anything. I don't hope so.

Best Regards Tobias

custom query with linked collection in v2?

Hello Artur,

Suppose I have a set with multiple entries of content links as highlighted below.

  "target": [
    {
      "A": [
        {
          "_model": "Type-A",
          "_id": "e34891a266653524790000b5"
        }
      ],
     "B": [
        {
          "_model": "Type-B",
          "_id": "b34891a278953524791111c9"
        }
      ],
    }
  ],

How do I make a custom query? I am using

        $options=array(
            'filter' => [
                'target.A._id' =>$targetID,
            ],  "populate"=> 1);

However, query does not return any entries. Could you suggest something?

"default" locale causes fatal error: Cannot access offset of type string on string

Steps to reproduce:

  • use a fresh cockpit without any configuration, except calling http://localhost:8080/install
  • create a collection and name it "test"
  • open collection "test" --> I'm now on http://localhost:8080/content/collection/items/test

This happens without any custom locale and with a single locale "de/Deutsch".

file:
/modules/Settings/Helper/Locales.php

error:
Cannot access offset of type string on string
'i18n' => $locale['i18n'],

After setting $app->helper('cache')->setCachePath('#storage:cache'); in #config:bootstrap.php, I was able to delete the wrong cache file manually (without entering my docker container to watch anything inside the sys tmp dir) and to see any changes made in Locales.php.

Working solutions:

ignore string locale

    public function locales(): array {

        $locales = [];

        foreach ($this->locales as $locale) {

            if (!\is_array($locale)) continue;

            $locales[] = [
                'i18n' => $locale['i18n'],
                'name' => $locale['name'],
            ];
        }

        return $locales;
    }

or:
clear cache and then store locale as array

    public function cache(): array {

        $cache = [
            'default' => [
                'i18n' => 'en',
                'name' => 'English',
            ]
        ];

        $locales = $this->app->dataStorage->find('system/locales', [
            'sort' => ['name' => 1]
        ])->toArray();

        foreach ($locales as $locale) {
            $cache[$locale['i18n']] = $locale;
        }

        $this->app->helper('cache')->write('app.locales', $cache);

        return $cache;
    }

UI: Add title label to title fields

Screenshot showing the top of a new Layout page

In the attached screenshot from the creation of a new Layout article type, it's not obvious what the 3rd and 5th fields are for. They are for the "title" of the translations, but it's not obvious (esp. as the "Slug" label looks equidistant between it's field (below) and the field above).

I suggest adding a "Title" label above the title fields and putting a little bit more spaces between the input and the next groups label.

Collection slug

Version Pro

Currently, the option in "pages" that allows to add a slug/routes to the item collections make a copy of the field.

For example, the title "It's a beautiful day".

It would be great if the field would be converted to a "browser-readable" address like: "its-a-beautiful-day".


UPDATE:

Cockpit PRO v 2.3.0

When a page is created the generated slug is correctly formatted to be "browser-readable".

image

But when we set up the id of the collection which is the reference to create the route to the collection objects.

image

The route to the collection object is not reformatted to be "browser-readable" like the page slug is.

image

It would be really ideal if this could be improved.

Best regards

No icons available

I'm unable to change the Model icons.

When I go to: 'Collection > Other > Icon' it shows "No icons found"

image

has the repeater field disappeared?

Hi,
in old versions of cockpit there was the set field and a repeater field for things that aren't relations.
Has this feature disappeared?

Error in GET requests

I am trying Cockpit for the first time today. Having errors in getting items but deleting items is working fine.

{"error":"SQLSTATE[HY000]: General error: 1 table collections_team already exists","file":"E:\xampp\htdocs\cockpit\lib\MongoLite\Database.php","line":153}

image

CORS Issue

Getting a proper response in Postman but cors error in the browser. any help?

Access to fetch at 'http://localhost/emergent/cockpit/api/content/items/Team' from origin 'http://localhost:2323' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
data.js:6 GET http://localhost/emergent/cockpit/api/content/items/Team net::ERR_FAILED
fetch_team @ data.js:6
(anonymous) @ data.js:16
(anonymous) @ data.js:17
data.js:6 Uncaught (in promise) TypeError: Failed to fetch
at fetch_team (data.js:6:30)
at data.js:16:5
at data.js:17:3

UX: Page selectors to show page list in matching translation by default

When you need to link to another page on a multi-language site, currently the Page selection list always initially loads in the default language.

It would be nicer if it was "translation aware"; in that the Page list translation would automatically load to match the translation of the section currently being edited.

In the attached video, a block in the English translation is being edited. When link page button is pressed, the Pages list shows German (the default language for this site). It would be nicer if the list showed English Pages [but retains the option to change the list to another locale if needed], but in most cases links between blocks and pages would likely be set to the same language by the site Editor.

cockpit-pageselection.mp4

top level await is not supported in Firefox (v88)

System

OS: openSUSE Tumbleweed
Desktop: i3
Browser: Firefox 88.0 (64-bit)
Firefox-Addons: NoScript, uBlock Origin, Decentraleyes, BlockTube, Facebook Container, KeePassXC-Browser

Steps to reproduce:

  • create or edit collection
  • see browser dev tools in js console tab

full error message

SyntaxError: top level await is not currently supported vue.js:1:12848
    VueJS 32
    _compile http://localhost:8080/modules/App/assets/js/vue-view.js:96
    compile http://localhost:8080/modules/App/assets/js/vue-view.js:21
    (Async: promise callback)
    compile http://localhost:8080/modules/App/assets/js/vue-view.js:20
    connectedCallback http://localhost:8080/modules/App/assets/js/vue-view.js:105
    <anonymous> http://localhost:8080/modules/App/assets/js/vue-view.js:109
    <anonymous> http://localhost:8080/modules/App/assets/js/vue-view.js:113

When I open it in chromium browser, I don't have this error message and I can edit the fields. In Firefox I only see the "Fields" headline without the "+" button below.


edit:
This should work in the upcoming Firefox 89 - https://bugzilla.mozilla.org/show_bug.cgi?id=1681046

But even when Firefox can handle top level awaits out of the box, there will be a lot of Firefox derivates (e.g. Tor browser) and ESR (Extended Support Release) versions around for a long time.

Bring back manual sorting

The ability to enable manual sorting on a collection thereby letting an editor drag and drop content was so powerful and unique to the previous version of cockpit. I would love to see it make its way back in the new version.

2FA CVE has the wrong composer handle

Github/Dependabot sent a mail about the 2FA CVE, because I have projects, that require aheinze/cockpit, which is obviously the old version 0.12.2.

Maybe now is the time to add a separate composer package agentejo/cockpit, which contains the new cockpit 2.x code.

The old 0.x repo can keep the old/wrong handle aheinze/cockpit.
See also: agentejo/cockpit#1321

Clearing a read only field through GUI

I noticed I could clear a read only field through the GUI, by clicking the little arrow button next to a field - and then save the entry. Is it supposed to work like this?

I'm on Cockpit v2.3.2 at this moment.

Responsible disclosure policy

Hello πŸ‘‹

I run a security community that finds and fixes vulnerabilities in OSS. A researcher (@WHOISshuvam) has found a potential issue, which I would be eager to share with you.

Could you add a SECURITY.md file with an e-mail address for me to send further details to? GitHub recommends a security policy to ensure issues are responsibly disclosed, and it would help direct researchers in the future.

Looking forward to hearing from you πŸ‘

(cc @huntr-helper)

avif error - Could not encode image: No codec available

i am getting error on thumbnail creation,

i am not sure from where i should get the codec, GD is installed.

[29-Oct-2022 15:19:09 UTC] PHP Warning: imageavif(): avif error - Could not encode image: No codec available in /shared/httpd/test/htdocs/cockpit-develop/lib/SimpleImageLib.php on line 182

i am using devilbox docker php 8.1

Best Regards.

Can't edit User because it is being edited by myself

While testing a different issue I noticed that if I edit my non admin user-account (or try to anyway), switch to a different account and log back in to the first my user can't be edited because it's currently being worked on by myself.

Steps to reproduce:

  1. Log in as non admin "lkr"
  2. edit User (doesn't work error 401)
  3. log out
  4. log in as admin
  5. don't edit anything and just log out
  6. login as "lkr" again
  7. can't edit user because it's being worked on by "lkr"

Children are not shown

If you create elements in a tree and also create children, these are neither displayed in the backend nor via the API.
This seems to be a problem in 2.3.5, because everything works fine in another installation under 2.3.3.

Clicking an asset within the asset manager should link to its edit panel

At the moment, clicking an image in the asset manager opens an image viewer rather than the edit panel that is opened by clicking the title. I believe many content managers won't even discover the edit panel with the current config and the behavior should be changed and a small icon for viewing the image should be added.

Assets more triggers - feature request

Is it possible to have a trigger after the asset was inserted in dataStorage ?

Actually in the β€˜add’ function of module Assets the trigger β€˜assets.add’ is trigged before the insert in datastorage

$this->app->trigger('assets.add', [&$assets]);
$this->app->dataStorage->insert('assets', $assets);

And if i want to make some modifications on the asset after the upload/add action it’s not possible.
Maybe for the trigger assets.asset.update is necessary too !?

Some thing like that :

  • $this->app->trigger('assets.add.done', [&$assets]);
  • $this->app->trigger('assets.asset.update.done', [&$assets]);

404 error except for /install/

Hi,

I am trying to get Cockpit running in a docker container, but I am currently failing to do so. After building the Dockerfile below and running it with docker run -it --rm -p "8080:80" cockpit and open the page http://localhost:8080/install/ in my browser I see that the installation completed successfully. However, if I click on login I get a 404. I get this for all sites which are not http://localhost:8080/install/.

FROM php:8.0-rc-apache-buster

RUN apt-get update \
    && apt-get install -y \
                wget zip unzip \
        libzip-dev \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libpng-dev \
        sqlite3 libsqlite3-dev \
        libssl-dev \
    && pecl install mongodb \
    && pecl install redis \
    && docker-php-ext-install -j$(nproc) iconv gd pdo zip opcache pdo_sqlite

RUN echo "extension=mongodb.so" > /usr/local/etc/php/conf.d/mongodb.ini
RUN echo "extension=redis.so" > /usr/local/etc/php/conf.d/redis.ini

RUN wget https://files.getcockpit.com/releases/master/cockpit-core.zip \
    && unzip cockpit-core.zip -d /tmp \
    && rm cockpit-core.zip \
    && cd /tmp/cockpit-core \
    && cp -Rp . /var/www/html \
    && cd /var/www/html \
    && rm -r /tmp/cockpit-core

ENV DOCUMENT_ROOT /var/www/html

# COPY config.php /var/www/html/config/config.php

RUN chown -R www-data:www-data /var/www/html

CMD ["apache2-foreground"]

P.S.
Btw. nice project, I tried multiple open source headless CMS and Cockpit is my favorite.

Default boolean value

By default boolean values are set to "null" it could be an improvement to set them to False.

Assets and Assets folder Roles & Permissions - feature request

Hello an other feature request,

Do you think it's possible to have specific assets and assets folder link to a role.
for exemple :
I have 3 role :

  • Admin
  • Manager-A
  • Manager-B

And I have 3 assets in the admin Assets panel with this kind of visibility

  • Asset 1 visible by Admin and Manager-A
  • Asset 2 visible by Admin and Manager-B
  • Asset 3 visible by Admin

I was thinking to a functioning like the old Addon Groups (v1)

How to get unpublished collection items?

In the API playground below the response text field GET /content/items/{model}, the description "Get list of published model items" made me realize that this list is pre-filtered.

How can I get the entire unfiltered list, i.e., including unpublished items (i.e., items with _state=0)?

Even with filter={_state:0}, the result list didn't change (still only published items).

Migration from 0.12 to 2.2

Is there a possibility to migrate my CMS from Cockpit version 0.12, to the new system on version 2.2? Did you provide any documentation to the problem?

Editing rich text field in Safari prepends every character

When trying to edit the value of a rich text field, the insertion point is repositioned to the beginning of the field after each character is typed.

  • Click anywhere in the field to position the insertion point.
  • Type a character.

Observe:

The character you just typed appears where the insertion point was, but the insertion point is now positioned at the very beginning of the field. Thus, without repositioning it after every character, you effectively start typing backward at the beginning.

I'm seeing this with a fresh install in Safari 15.6.1.

Chrome 104.0.5112.101 works as expected.

Asset preview image never generated (jpg being mistaken for avif)

After uploading an image, a preview is never generated. However, the image is uploaded and can be fetched/altered via the api.

Attempting to upload an image throws "PHP Warning: imageavif(): AVIF image support has been disabled" in /lib/SimpleImageLib.php on line 182

The image is a jpg. Even the cockpit api lists the mimetype as image/jpeg. So the switch statement in SimpleImage seems to be working and I assume the issue is with detecting the mimetype

Content Preview DOMException: Blocked a frame with origin ... from accessing a cross-origin frame

I'm trying to use content preview with Cockpit V2 but I always get the folowing error:

DOMException: Blocked a frame with origin "https://cockpit-pro" from accessing a cross-origin frame.
at gt (https://cockpit-pro/modules/App/assets/app.bundle.js?ver=2.3.3:4:12122)
at Object.set (https://cockpit-pro/modules/App/assets/app.bundle.js?ver=2.3.3:4:8176)
at Object.set (https://cockpit-pro/modules/App/assets/app.bundle.js?ver=2.3.3:4:31838)
at Proxy.iframeReady (https://cockpit-pro/modules/System/assets/dialogs/content-preview.js?v=2.3.3:130:25)
at onLoad (eval at eu (https://cockpit-pro/modules/App/assets/app.bundle.js?ver=2.3.3:4:120495), :113:26)
at Lt (https://cockpit-pro/modules/App/assets/app.bundle.js?ver=2.3.3:4:14407)
at jt (https://cockpit-pro/modules/App/assets/app.bundle.js?ver=2.3.3:4:14487)
at HTMLIFrameElement.n (https://cockpit-pro/modules/App/assets/app.bundle.js?ver=2.3.3:4:63771)

It seems an error while getting the iframe element, but I don't have any clue why, anyway to fix this?

Custom field types

In the "old version" of Cockpit custom field types where possible when you install them via /config/tags.
Is that also possible with the new version?

`APP_API_REQUEST` detection incorrect

Setup:
PHP 7.4 inside docker container
volumes: ./cockpit-next:/var/www/html

Steps to reproduce:

  • go to http://localhost:8080/settings/api and open browser dev tools to see message below
  • or open any url that contains /api/
XHR POST http://localhost:8080/settings/api/load
[HTTP/1.0 500 Internal Server Error 2ms]

Uncaught (in promise) 
Object { error: "Cannot use object of type Lime\\Response as array", file: "/var/www/html/index.php", line: 122 }

Fix:

Change https://github.com/Cockpit-HQ/cockpit-next/blob/master/index.php#L64

define('APP_API_REQUEST', strpos($_SERVER['REQUEST_URI'], APP_BASE_URL.'/api/') !== false ? 1:0);

to

define('APP_API_REQUEST', strpos($_SERVER['REQUEST_URI'], APP_BASE_URL.'/api/') === 0 ? 1:0);

I'm not sure, how to contribute directly, because I can't fork the repo.

Switch Model View

If you click on the expand icon in the Content / Collections area, an empty white window appears with the message [object HTMLElement]

Repeatable wysiwyg field breaks model

When adding a repeatable wysiwyg field to an existing model that already has entries, the models item overview page breaks and displays a blank page.

Title Value
Cockpit Version 2.3.0
PHP Version 8.1.11
PHP SAPI litespeed
System x86_64
Extensions Core, date, libxml, openssl, pcre, sqlite3, zlib, bz2, calendar, ctype, curl, hash, filter, ftp, gettext, json, iconv, SPL, pcntl, readline, Reflection, session, standard, mbstring, shmop, SimpleXML, tokenizer, xml, litespeed, apcu, bcmath, dom, fileinfo, gd, gmp, imagick, imap, intl, ldap, exif, mysqlnd, mysqli, PDO, pdo_mysql, OAuth, pdo_sqlite, Phar, posix, pspell, soap, sockets, sodium, tidy, vips, xmlreader, xmlrpc, xmlwriter, xsl, zip, Zend OPcache
Max. execution time 300 sec.
Memory limit 256M
Upload file size limit 500M
Realpath Cache 4096K / 120 (ttl)
System temporary directory /tmp
OPCache Enabled
LSPHP_ENABLE_USER_INI on
PHP_INI_SCAN_DIR /etc/php_settings/conf.d
PATH /usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
VIPSHOME /usr

Non admin User can't edit it's own account

I have a role "editor" in my project and if I try to change my account (e.G. the color scheme) I get 401 - Unauthorized
as a response and an error in the console:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'error')
    at data:text/javascript;charset=utf-8,%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20export%20default%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20data()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20return%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20saving%3A%20false%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20user%3A%20%7B%22active%22%3Atrue%2C%22user%22%3A%22lkr%22%2C%22email%22%3A%22lkr%40elbformat.de%22%2C%22role%22%3A%22editor%22%2C%22theme%22%3A%22auto%22%2C%22i18n%22%3A%22en%22%2C%22twofa%22%3A%7B%22enabled%22%3Afalse%2C%22secret%22%3A%22XEELZYK2F4U2WORABCVC6PGA33K34WEH%22%7D%2C%22name%22%3A%22lkr%22%2C%22_modified%22%3A1668605158%2C%22_created%22%3A1668605158%2C%22_id%22%3A%226374e4e64e0d287b830f7733%22%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20roles%3A%20%5B%7B%22appid%22%3A%22admin%22%2C%22name%22%3A%22Admin%22%7D%2C%7B%22appid%22%3A%22public%22%2C%22name%22%3A%22Public%22%7D%2C%7B%22appid%22%3A%22editor%22%2C%22name%22%3A%22Redakteur%22%7D%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20languages%3A%20%5B%7B%22i18n%22%3A%22en%22%2C%22language%22%3A%22English%22%7D%5D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20watch%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20'user.theme'%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20handler(val)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20document.documentElement.setAttribute('data-theme'%2C%20val)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20methods%3A%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20generateToken()%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.%24request('%2Futils%2FgenerateToken').then(res%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.user.apiKey%20%3D%20%60USR-%24%7Bres.token%7D%60%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20copyToken()%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20App.utils.copyText(this.user.apiKey%2C%20()%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20App.ui.notify('Token%20copied!')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20save()%20%7B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20let%20isUpdate%20%3D%20this.user._id%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.saving%20%3D%20true%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.%24request('%2Fsystem%2Fusers%2Fsave'%2C%20%7Buser%3A%20this.user%7D).then(user%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.user%20%3D%20user%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.saving%20%3D%20false%3B%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20(isUpdate)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20App.ui.notify('User%20updated!')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20App.ui.notify('User%20created!')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D).catch(res%20%3D%3E%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20this.saving%20%3D%20false%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20App.ui.notify(:15270/system/users/res.error%20%7C%7C%20'Saving%20failed!'%2C%20'error')%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D)%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20:53:47

I'd expect to be able to edit my own account (at least some of the fields) or at least get an error notification in the UI. I tried setting User-Permissions using the UI but I was only able to allow a user group to edit ALL users and not just themselfes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.