Commit 982a7c6d authored by Emma's avatar Emma 🏳🌈

warn admins that attempt to edit other users

parent 90c1af96
Pipeline #52124214 passed with stages
in 6 minutes and 40 seconds
......@@ -6,18 +6,6 @@
"units_per_em": 1000,
"ascent": 850,
"glyphs": [
{
"uid": "a79ef2d6f102af86440aa80238d5f4b0",
"css": "down",
"code": 59392,
"src": "elusive"
},
{
"uid": "cbb11c546600a92fde108476faf5d337",
"css": "up",
"code": 59393,
"src": "elusive"
},
{
"uid": "8b80d36d4ef43889db10bc1f0dc9a862",
"css": "user",
......@@ -57,7 +45,7 @@
{
"uid": "98d9c83c1ee7c2c25af784b518c522c5",
"css": "block",
"code": 59403,
"code": 59404,
"src": "fontawesome"
},
{
......@@ -71,6 +59,108 @@
"css": "sitemap",
"code": 61672,
"src": "fontawesome"
},
{
"uid": "598a5f2bcf3521d1615de8e1881ccd17",
"css": "clock",
"code": 59400,
"src": "fontawesome"
},
{
"uid": "0ddd3e8201ccc7d41f7b7c9d27eca6c1",
"css": "link",
"code": 59401,
"src": "fontawesome"
},
{
"uid": "98edd99a41fbdc5633151cd21b7e56f8",
"css": "up",
"code": 59403,
"src": "iconic"
},
{
"uid": "41d90aea465750c2a5dc6cb0bdef9617",
"css": "down",
"code": 59393,
"src": "iconic"
},
{
"uid": "5408be43f7c42bccee419c6be53fdef5",
"css": "text",
"code": 61686,
"src": "fontawesome"
},
{
"uid": "p57wgnf4glngbchbucdi029iptu8oxb8",
"css": "pin",
"code": 59402,
"src": "typicons"
},
{
"uid": "090c79ed8971e478a27fae8a3eb3eb11",
"css": "hashtag",
"code": 62098,
"src": "fontawesome"
},
{
"uid": "fb1c59faa93eb6e2248c2456625b08a2",
"css": "user-times",
"code": 62005,
"src": "fontawesome"
},
{
"uid": "657ab647f6248a6b57a5b893beaf35a9",
"css": "lock-open",
"code": 59405,
"src": "fontawesome"
},
{
"uid": "cda0cdcfd38f5f1d9255e722dad42012",
"css": "spinner",
"code": 61712,
"src": "fontawesome"
},
{
"uid": "750058837a91edae64b03d60fc7e81a7",
"css": "ellipsis-vert",
"code": 61762,
"src": "fontawesome"
},
{
"uid": "d35a1d35efeb784d1dc9ac18b9b6c2b6",
"css": "pencil",
"code": 59406,
"src": "fontawesome"
},
{
"uid": "bbfb51903f40597f0b70fd75bc7b5cac",
"css": "trash",
"code": 61944,
"src": "fontawesome"
},
{
"uid": "44e04715aecbca7f266a17d5a7863c68",
"css": "plus",
"code": 59392,
"src": "fontawesome"
},
{
"uid": "3d39c828009c04ddb6764c0b04cd2439",
"css": "forward",
"code": 59407,
"src": "fontawesome"
},
{
"uid": "85528017f1e6053b2253785c31047f44",
"css": "comment",
"code": 59408,
"src": "fontawesome"
},
{
"uid": "c76b7947c957c9b78b11741173c8349b",
"css": "attention",
"code": 59409,
"src": "fontawesome"
}
]
}
\ No newline at end of file
.fg-orange {
color: var(--fg-orange) !important;
}
......@@ -16,6 +16,10 @@
&--success {
background: var(--bg-green);
}
&--warn {
background: var(--bg-orange);
}
}
@keyframes alert-fadein {
......
......@@ -7,6 +7,7 @@
// components
@import '_colors/card';
@import '_colors/fg';
@import '_components/alert';
@import '_components/button';
......
#!/bin/bash
#!/bin/sh
# Download icons, create sprite sheet, save to templates/_includes/icons.svg.
# The sprite sheet should be committed to the git repository.
# The generated sprite sheet should be committed to the git repository.
# Note: this must be kept compatible with regular /bin/sh so it runs under the
# Alpine-based docker container.
set -e
......@@ -12,22 +15,27 @@ OUT="$PROJECT_ROOT/templates/_includes/icons.svg"
trap 'rm -rf "$TEMP"' EXIT
fontello-cli install --config "$PROJECT_ROOT"/fontello.json --font "$TEMP" --css "$TEMP"
font-blast "$TEMP"/postmill.svg "$TEMP"
cp "$PROJECT_ROOT"/assets/icons/*.svg "$TEMP"/svg
fontello-cli install --config "$PROJECT_ROOT/assets/fontello.json" --font "$TEMP" --css "$TEMP"
font-blast "$TEMP/postmill.svg" "$TEMP"
#cp "$PROJECT_ROOT"/assets/icons/*.svg "$TEMP/svg"
# no webpack svg sprite loaders, they suck and don't work
echo '<svg xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
display="none"
width="0"
height="0"><defs>' > "$TEMP"/icons.svg
height="0"><defs>' > "$TEMP/icons.svg"
for file in "$TEMP"/svg/*.svg; do
icon=$(basename "${file%.svg}")
sed -e "s/^<svg\(>\| \)/<symbol id=\"$icon\" /" \
-e 's/ xmlns="[^"]\+"\( \|\)/ /g' \
-e "s!</svg>!</symbol>!" "$file" >> "$TEMP/icons.svg"
perl -pe'$ARGV=~s!.*/|\.svg$!!g;
s/^<svg ?/<symbol id="$ARGV" /;
s/ xmlns=".*?" ?/ /g;
s!</svg>!</symbol>\n!' "$TEMP"/svg/*.svg >> "$TEMP"/icons.svg
echo >> "$TEMP/icons.svg"
done
echo '</defs></svg>' >> "$TEMP"/icons.svg
echo '</defs></svg>' >> "$TEMP/icons.svg"
mv "$TEMP"/icons.svg "$OUT"
mv "$TEMP/icons.svg" "$OUT"
......@@ -6580,9 +6580,9 @@
}
},
"natives": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz",
"integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=",
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/natives/-/natives-1.1.6.tgz",
"integrity": "sha512-6+TDFewD4yxY14ptjKaS63GVdtKiES1pTPyxn9Jb0rBqPMZ7VcCiooEhPNsr+mqHtMGxa/5c/HhcC4uPEUw/nA==",
"dev": true
},
"natural-compare": {
......
......@@ -3,6 +3,7 @@
display="none"
width="0"
height="0"><defs>
<symbol id="attention" viewBox="0 0 1000 1000"><path d="M571 767V661q0-8-5-13t-12-5H446q-7 0-12 5t-5 13v106q0 8 5 13t12 6h108q7 0 12-6t5-13zm-1-208l10-257q0-6-5-10-7-6-14-6H439q-6 0-14 6-5 4-5 12l9 255q0 5 6 9t13 3h103q8 0 14-3t5-9zm-7-522l428 786q20 35-1 70-9 17-26 26t-35 10H71q-18 0-35-10t-26-26q-21-35-1-70L438 37q9-17 26-27t36-10 36 10 27 27z"/></symbol>
<symbol id="block" viewBox="0 0 857.1 1000"><path d="M732 498q0-90-48-164L263 754q76 50 166 50 62 0 118-25t96-65 65-97 24-119zM175 665l421-421q-75-50-167-50-83 0-153 40T166 345t-41 153q0 91 50 167zm682-167q0 88-34 168t-91 137-137 92-166 34-167-34-137-92-91-137T0 498t34-167 91-137 137-91 167-34 166 34 137 91 91 137 34 167z"/></symbol>
<symbol id="clock" viewBox="0 0 857.1 1000"><path d="M500 304v250q0 7-5 12t-13 5H304q-8 0-13-5t-5-12v-36q0-8 5-13t13-5h125V304q0-8 5-13t12-5h36q8 0 13 5t5 13zm232 196q0-83-41-152T581 237t-152-41-153 41-110 111-41 152 41 152 110 111 153 41 152-41 110-111 41-152zm125 0q0 117-57 215T644 871t-215 58-216-58T58 715 0 500t58-215 155-156 216-58 215 58 156 156 57 215z"/></symbol>
<symbol id="comment" viewBox="0 0 1000 1000"><path d="M1000 500q0 97-67 179T751 809t-251 48q-39 0-81-4-110 97-257 135-27 8-63 12-10 1-17-5t-10-16v-1q-2-2 0-6t1-6 2-5l4-5 4-5 4-5q4-5 17-19t20-22 17-22 18-28 15-33 15-42q-88-50-138-123T0 500q0-73 40-139t106-114 160-76 194-28q136 0 251 48t182 130 67 179z"/></symbol>
......@@ -16,8 +17,6 @@
<symbol id="lock" viewBox="0 0 642.9 1000"><path d="M179 429h285V321q0-59-42-101t-101-41-101 41-41 101v108zm464 53v322q0 22-16 37t-38 16H54q-23 0-38-16T0 804V482q0-22 16-38t38-15h17V321q0-102 74-176t176-74 177 74 73 176v108h18q23 0 38 15t16 38z"/></symbol>
<symbol id="logout" viewBox="0 0 928.6 1000"><path d="M357 804q0 2 1 11t0 14-2 14-5 11-12 3H161q-67 0-114-47T0 696V304q0-67 47-114t114-47h178q8 0 13 5t5 13q0 2 1 11t0 15-2 13-5 11-12 3H161q-37 0-63 26t-27 64v392q0 37 27 63t63 27h180l7 2 4 3 4 5 1 8zm518-304q0 14-11 25L561 829q-11 10-25 10t-25-10-11-25V643H250q-14 0-25-11t-11-25V393q0-15 11-25t25-11h250V196q0-14 11-25t25-10 25 10l303 304q11 10 11 25z"/></symbol>
<symbol id="mail" viewBox="0 0 1000 1000"><path d="M929 839V411q-18 20-39 36-149 115-238 189-28 24-46 37t-48 28-57 13h-2q-26 0-57-13t-48-28-46-37q-88-74-238-189-21-16-39-36v428q0 7 6 13t12 5h822q7 0 12-5t6-13zm0-586v-14l-1-7-1-7-3-5-5-4-8-2H89q-7 0-12 6t-6 12q0 94 83 159 107 84 223 176 4 3 20 17t25 21 25 17 28 16 24 5h2q11 0 24-5t28-16 25-17 25-21 20-17q116-92 224-176 30-24 56-65t26-73zm71-21v607q0 37-26 63t-63 27H89q-36 0-63-27T0 839V232q0-37 26-63t63-26h822q37 0 63 26t26 63z"/></symbol>
<symbol id="markdown" viewBox="0 0 208 128"><rect width="198" height="118" x="5" y="5" ry="10" stroke-width="10" stroke="currentColor" fill="none"/><path d="M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"/></symbol>
<symbol id="menu" viewBox="0 0 857.1 1000"><path d="M857 750v71q0 15-10 25t-26 11H36q-15 0-25-11T0 821v-71q0-15 11-25t25-11h785q15 0 26 11t10 25zm0-286v72q0 14-10 25t-26 10H36q-15 0-25-10T0 536v-72q0-14 11-25t25-10h785q15 0 26 10t10 25zm0-285v71q0 14-10 25t-26 11H36q-15 0-25-11T0 250v-71q0-15 11-26t25-10h785q15 0 26 10t10 26z"/></symbol>
<symbol id="pencil" viewBox="0 0 857.1 1000"><path d="M203 857l50-51-131-131-51 51v60h72v71h60zm291-518q0-12-12-12-5 0-9 4L170 633q-4 4-4 10 0 12 13 12 5 0 9-4l303-302q3-4 3-10zm-30-107l232 232-464 465H0V696zm381 54q0 29-20 50l-93 93-232-233 93-92q20-21 50-21 29 0 51 21l131 131q20 22 20 51z"/></symbol>
<symbol id="pin" viewBox="0 0 834 1000"><path d="M573 813q0 23-15 38t-37 15q-21 0-37-16L315 681 0 917l236-315L68 433q-24-23-12-56 14-32 48-32 157 0 270-57 90-45 151-171 9-24 36-32t50 13l208 209q21 23 14 50t-32 36q-127 63-172 152-56 110-56 268z"/></symbol>
......
{% extends 'base.html.twig' %}
{% from '_macros/icon.html.twig' import icon %}
{% block title %}{{ 'edit_user.title'|trans({'%username%': user.username}) }}{% endblock %}
{% block title 'edit_user.title'|trans({'%username%': user.username}) %}
{% block page_classes %}edit-user-page{% endblock %}
{% block body %}
<h1 class="page-heading break-text">{{ block('title') }}</h1>
{% if app.user != user %}
<div class="alert alert--warn">
<p>
<span class="fg-orange">{{ icon('attention') }}</span>
{{ 'flash.editing_credentials_of_other_user'|trans }}
</p>
</div>
{% endif %}
{% include 'user/_form.html.twig' %}
{% endblock %}
......@@ -137,6 +137,7 @@ flash:
webhook_added: The webhook was added successfully.
webhook_edited: The webhook was edited successfully.
wiki_page_deleted: The wiki page has been deleted.
editing_credentials_of_other_user: You are editing the credentials of another user. This can prevent them from logging in.
forum:
moderators: Moderators
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment