mirror of
https://github.com/typemill/typemill.git
synced 2025-04-21 04:21:56 +02:00
Version 1.3.8: Roles and rights
This commit is contained in:
parent
93afe9f845
commit
591190410f
36
composer.lock
generated
36
composer.lock
generated
@ -791,16 +791,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.17.1",
|
||||
"version": "v1.18.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-ctype.git",
|
||||
"reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d"
|
||||
"reference": "1c302646f6efc070cd46856e600e5e0684d6b454"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d",
|
||||
"reference": "2edd75b8b35d62fd3eeabba73b26b8f1f60ce13d",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454",
|
||||
"reference": "1c302646f6efc070cd46856e600e5e0684d6b454",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -812,7 +812,7 @@
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.17-dev"
|
||||
"dev-master": "1.18-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
@ -849,7 +849,7 @@
|
||||
"polyfill",
|
||||
"portable"
|
||||
],
|
||||
"time": "2020-06-06T08:46:27+00:00"
|
||||
"time": "2020-07-14T12:35:20+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
@ -903,30 +903,30 @@
|
||||
},
|
||||
{
|
||||
"name": "twig/twig",
|
||||
"version": "v1.42.5",
|
||||
"version": "v1.43.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/twigphp/Twig.git",
|
||||
"reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e"
|
||||
"reference": "597a03e85a60af6feee4f5127f3ef4279a1694c3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e",
|
||||
"reference": "87b2ea9d8f6fd014d0621ca089bb1b3769ea3f8e",
|
||||
"url": "https://api.github.com/repos/twigphp/Twig/zipball/597a03e85a60af6feee4f5127f3ef4279a1694c3",
|
||||
"reference": "597a03e85a60af6feee4f5127f3ef4279a1694c3",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.5.0",
|
||||
"php": ">=7.1.3",
|
||||
"symfony/polyfill-ctype": "^1.8"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/container": "^1.0",
|
||||
"symfony/phpunit-bridge": "^4.4|^5.0"
|
||||
"symfony/phpunit-bridge": "^4.4.9|^5.0.9"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.42-dev"
|
||||
"dev-master": "1.43-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
@ -963,7 +963,7 @@
|
||||
"keywords": [
|
||||
"templating"
|
||||
],
|
||||
"time": "2020-02-11T05:59:23+00:00"
|
||||
"time": "2020-07-05T13:00:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "vlucas/valitron",
|
||||
@ -971,12 +971,12 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/valitron.git",
|
||||
"reference": "4af076d19f3cd4fd61f560cba115316834c7fe81"
|
||||
"reference": "9268adeeb48ba155e35dca861f5990283e14eafb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/4af076d19f3cd4fd61f560cba115316834c7fe81",
|
||||
"reference": "4af076d19f3cd4fd61f560cba115316834c7fe81",
|
||||
"url": "https://api.github.com/repos/vlucas/valitron/zipball/9268adeeb48ba155e35dca861f5990283e14eafb",
|
||||
"reference": "9268adeeb48ba155e35dca861f5990283e14eafb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1012,7 +1012,7 @@
|
||||
"validation",
|
||||
"validator"
|
||||
],
|
||||
"time": "2020-05-14T14:50:07+00:00"
|
||||
"time": "2020-07-10T08:55:05+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
|
@ -1,12 +1,12 @@
|
||||
meta:
|
||||
title: 'Content Elements'
|
||||
description: "There are a lot of other settings for your content area. For example: \nAdd an edit-button for github, gitlab or other plattforms.\nShow the author.\nShow the publish date.\nShow the chapter numbers in the navigation.\n"
|
||||
heroimage: null
|
||||
description: "There are a lot of other settings for your content area. For example: \n"
|
||||
heroimage: ''
|
||||
heroimagealt: null
|
||||
owner: testauthor
|
||||
author: trendschau
|
||||
manualdate: null
|
||||
modified: '2020-07-09'
|
||||
modified: '2020-06-14'
|
||||
created: '2020-06-11'
|
||||
time: 21-05-02
|
||||
navtitle: 'content elements'
|
||||
|
@ -104,28 +104,23 @@ describe('Typemill Setup', function()
|
||||
{
|
||||
cy.visit('/tm/user/trendschau')
|
||||
cy.url().should('include', '/tm/user/trendschau')
|
||||
|
||||
cy.get('input[name="showusername"]')
|
||||
cy.get('input[name="user[username]"]')
|
||||
.should('have.value', 'trendschau')
|
||||
.and('have.attr','disabled')
|
||||
cy.get('input[name="username"]')
|
||||
.should('have.value', 'trendschau')
|
||||
cy.get('input[name="firstname"]')
|
||||
cy.get('input[name="user[firstname]"]')
|
||||
.clear()
|
||||
.type('Sebastian')
|
||||
.should('have.value', 'Sebastian')
|
||||
cy.get('input[name="lastname"]')
|
||||
cy.get('input[name="user[lastname]"]')
|
||||
.clear()
|
||||
.type('Schürmanns')
|
||||
.should('have.value', 'Schürmanns')
|
||||
cy.get('input[name="email"]')
|
||||
cy.get('input[name="user[email]"]')
|
||||
.should('have.value', 'trendschau@gmail.com')
|
||||
.and('have.attr','required')
|
||||
cy.get('select[name="userrole"]')
|
||||
.should('have.attr','required')
|
||||
cy.get('input[name="password"]')
|
||||
cy.get('select[name="user[userrole]"]')
|
||||
.should('have.value','administrator')
|
||||
cy.get('input[name="user[password]"]')
|
||||
.should('have.value', '')
|
||||
cy.get('input[name="newpassword"]')
|
||||
cy.get('input[name="user[newpassword]"]')
|
||||
.should('have.value', '')
|
||||
|
||||
cy.get('#userform').submit()
|
||||
|
@ -18,8 +18,8 @@ describe('Typemill Initial Frontend', function()
|
||||
expect($a[4].href).to.match(/welcome\/markdown-test/)
|
||||
expect($a[5].href).to.match(/cyanine-theme/)
|
||||
expect($a[6].href).to.match(/cyanine-theme\/landingpage/)
|
||||
expect($a[7].href).to.match(/cyanine-theme\/footer/)
|
||||
expect($a[8].href).to.match(/cyanine-theme\/colors-and-fonts/)
|
||||
expect($a[7].href).to.match(/cyanine-theme\/colors-and-fonts/)
|
||||
expect($a[8].href).to.match(/cyanine-theme\/footer/)
|
||||
expect($a[9].href).to.match(/cyanine-theme\/content-elements/)
|
||||
})
|
||||
})
|
||||
|
@ -329,7 +329,8 @@ class PageController extends Controller
|
||||
|
||||
foreach ($structure as $key => $item)
|
||||
{
|
||||
$filename = ($item->elementType == 'folder') ? DIRECTORY_SEPARATOR . 'index.yaml' : $item->pathWithoutType . '.yaml';
|
||||
# $filename = ($item->elementType == 'folder') ? DIRECTORY_SEPARATOR . 'index.yaml' : $item->pathWithoutType . '.yaml';
|
||||
$filename = $item->pathWithoutType . '.yaml';
|
||||
|
||||
if(file_exists($contentPath . $filename))
|
||||
{
|
||||
|
@ -702,7 +702,7 @@ class SettingsController extends Controller
|
||||
$user = new User();
|
||||
$validate = new Validation();
|
||||
$userroles = $this->c->acl->getRoles();
|
||||
|
||||
|
||||
$redirectRoute = ($userdata['username'] == $_SESSION['user']) ? $this->c->router->pathFor('user.account') : $this->c->router->pathFor('user.show', ['username' => $userdata['username']]);
|
||||
|
||||
# check if user is allowed to view (edit) userlist and other users
|
||||
@ -833,11 +833,13 @@ class SettingsController extends Controller
|
||||
$fields = $this->c->dispatcher->dispatch('onUserfieldsLoaded', new OnUserfieldsLoaded($fields))->getData();
|
||||
|
||||
# only roles who can edit content need profile image and description
|
||||
if($this->c->acl->isAllowed($role, 'content', 'create'))
|
||||
if($this->c->acl->isAllowed($role, 'mycontent', 'create'))
|
||||
{
|
||||
$newfield['image'] = ['label' => 'Profile-Image', 'type' => 'image'];
|
||||
$newfield['description'] = ['label' => 'Author-Description (Markdown)', 'type' => 'textarea'];
|
||||
array_splice($fields,1,0,$newfield);
|
||||
|
||||
$fields = array_slice($fields, 0, 1, true) + $newfield + array_slice($fields, 1, NULL, true);
|
||||
# array_splice($fields,1,0,$newfield);
|
||||
}
|
||||
|
||||
# Only admin can change userroles
|
||||
|
@ -82,7 +82,7 @@ class Settings
|
||||
'contentFolder' => 'content',
|
||||
'cache' => true,
|
||||
'cachePath' => $rootPath . 'cache',
|
||||
'version' => '1.3.7.2',
|
||||
'version' => '1.3.8',
|
||||
'setup' => true,
|
||||
'welcome' => true,
|
||||
'images' => ['live' => ['width' => 820], 'thumbs' => ['width' => 250, 'height' => 150]],
|
||||
|
@ -2175,7 +2175,7 @@ const medialib = Vue.component('medialib', {
|
||||
|
||||
this.$parent.showmedialib = false;
|
||||
|
||||
this.$parent.createmarkdown();
|
||||
this.$parent.createmarkdown(image.src_live);
|
||||
/* this.$parent.updatemarkdown(imgmarkdown, image.src_live); */
|
||||
}
|
||||
if(this.parentcomponent == 'files')
|
||||
@ -2209,7 +2209,7 @@ const medialib = Vue.component('medialib', {
|
||||
|
||||
this.$parent.showmedialib = false;
|
||||
|
||||
this.$parent.createmarkdown();
|
||||
this.$parent.createmarkdown(file.url);
|
||||
/* this.$parent.updatemarkdown(imgmarkdown, file.url);*/
|
||||
}
|
||||
if(this.parentcomponent == 'files')
|
||||
|
@ -64,6 +64,11 @@ Vue.component('component-image', {
|
||||
/* is called from child component medialib */
|
||||
this.update(url);
|
||||
},
|
||||
createmarkdown: function(url)
|
||||
{
|
||||
/* is called from child component medialib */
|
||||
this.update(url);
|
||||
},
|
||||
deleteImage: function()
|
||||
{
|
||||
this.imgpreview = false;
|
||||
|
@ -19,8 +19,8 @@
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
|
||||
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/tachyons.min.css?20200614" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200614" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/tachyons.min.css?20200716" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200716" />
|
||||
</head>
|
||||
<body>
|
||||
<svg style="position: absolute; width: 0; height: 0; overflow: hidden" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
@ -74,14 +74,14 @@
|
||||
<footer></footer>
|
||||
</div>
|
||||
<!-- <script src="{{ base_url }}/system/author/js/color-picker.min.js?20200505"></script> -->
|
||||
<script src="{{ base_url }}/system/author/js/axios.min.js?20200226"></script>
|
||||
<script src="{{ base_url }}/system/author/js/axios.min.js?20200716"></script>
|
||||
<script>
|
||||
const myaxios = axios.create();
|
||||
myaxios.defaults.baseURL = "{{ base_url }}";
|
||||
</script>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/typemillutils.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/typemillutils.js?20200716"></script>
|
||||
<script>
|
||||
typemillUtilities.start()
|
||||
</script>
|
||||
|
@ -20,7 +20,7 @@
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
|
||||
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200614" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200716" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/color-picker.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
@ -56,6 +56,6 @@
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
</div>
|
||||
<script src="{{ base_url }}/system/author/js/auth.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/auth.js?20200716"></script>
|
||||
</body>
|
||||
</html>
|
@ -19,7 +19,7 @@
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
|
||||
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200614" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200716" />
|
||||
</head>
|
||||
<body>
|
||||
<svg style="position: absolute; width: 0; height: 0; overflow: hidden" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/tachyons.min.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200614" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200716" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/color-picker.min.css" />
|
||||
|
||||
{{ assets.renderCSS() }}
|
||||
@ -197,17 +197,17 @@
|
||||
</article>
|
||||
<footer></footer>
|
||||
</div>
|
||||
<script src="{{ base_url }}/system/author/js/axios.min.js?20200226"></script>
|
||||
<script src="{{ base_url }}/system/author/js/axios.min.js?20200716"></script>
|
||||
<script>
|
||||
const myaxios = axios.create();
|
||||
myaxios.defaults.baseURL = "{{ base_url }}";
|
||||
</script>
|
||||
<script src="{{ base_url }}/system/author/js/typemillutils.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/autosize.min.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-blox-config.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/typemillutils.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/autosize.min.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-blox-config.js?20200716"></script>
|
||||
<script>
|
||||
let formatConfig = {{ settings.formats|json_encode() }};
|
||||
let language = {{ settings.language|json_encode() }};
|
||||
@ -217,13 +217,13 @@
|
||||
|
||||
{{ assets.renderEditorJS() }}
|
||||
|
||||
<script src="{{ base_url }}/system/author/js/vue-blox.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-posts.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/sortable.min.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vuedraggable.umd.min.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-navi.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-shared.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-meta.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-blox.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-posts.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/sortable.min.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vuedraggable.umd.min.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-navi.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-shared.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-meta.js?20200716"></script>
|
||||
|
||||
{{ assets.renderJS() }}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="{{ base_url }}/system/author/img/favicon-180.png" />
|
||||
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/normalize.css" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200614" />
|
||||
<link rel="stylesheet" href="{{ base_url }}/system/author/css/style.css?20200716" />
|
||||
|
||||
{{ assets.renderCSS() }}
|
||||
|
||||
@ -83,16 +83,16 @@
|
||||
</article>
|
||||
<footer></footer>
|
||||
</div>
|
||||
<script src="{{ base_url }}/system/author/js/axios.min.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/axios.min.js?20200716"></script>
|
||||
<script>
|
||||
const myaxios = axios.create();
|
||||
myaxios.defaults.baseURL = "{{ base_url }}";
|
||||
</script>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/autosize.min.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/sortable.min.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vuedraggable.umd.min.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue.min.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/autosize.min.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/sortable.min.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vuedraggable.umd.min.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/author.js?20200716"></script>
|
||||
|
||||
<script>
|
||||
let language = {{ settings.language|json_encode() }};
|
||||
@ -102,10 +102,10 @@
|
||||
|
||||
{{ assets.renderEditorJS() }}
|
||||
|
||||
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-editor.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-meta.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-navi.js?20200614"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-publishcontroller.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-editor.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-meta.js?20200716"></script>
|
||||
<script src="{{ base_url }}/system/author/js/vue-navi.js?20200716"></script>
|
||||
|
||||
{{ assets.renderJS() }}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
name: Cyanine Theme
|
||||
version: 1.0.0
|
||||
version: 1.0.1
|
||||
description: Cyanine is a modern and flexible multi-purpose theme and the standard theme for typemill.
|
||||
author: Trendschau
|
||||
homepage: https://trendschau.net
|
||||
|
Loading…
x
Reference in New Issue
Block a user