Repository navigation
Personal settings auth tokens - #24703
Conversation
aea0805 to
0e32440
Compare
There was a problem hiding this comment.
Please either use the full class or import the full class
There was a problem hiding this comment.
Also only public interfaces shall be returned™
There was a problem hiding this comment.
If there is no public interface yet, because it's not yet done add a FIXME/TODO to make that clear
There was a problem hiding this comment.
But this is an internal only method.
0e32440 to
8a9aec1
Compare
|
After applying this: diff --git a/settings/css/settings.css b/settings/css/settings.css
index be61265..42e2594 100644
--- a/settings/css/settings.css
+++ b/settings/css/settings.css
@@ -100,21 +100,27 @@ input#identity {
table.nostyle label { margin-right: 2em; }
table.nostyle td { padding: 0.2em 0; }
-#sessions,
-#devices {
- min-height: 180px;
-}
#sessions table,
#devices table {
width: 100%;
- min-height: 150px;
- padding-top: 25px;
}
#sessions table th,
#devices table th {
font-weight: 800;
}
+#sessions table th,
+#sessions table td,
+#devices table th,
+#devices table td {
+ padding: 10px;
+}
+
+#sessions .token-list td,
+#devices .token-list td {
+ border-top: 1px solid #DDD;
+}
+
/* USERS */
#newgroup-init a span { margin-left: 20px; }
#newgroup-init a span:before {
diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js
index 0ca1682..b2bdee8 100644
--- a/settings/js/authtoken_view.js
+++ b/settings/js/authtoken_view.js
@@ -50,7 +50,9 @@
list.html('');
tokens.forEach(function(token) {
- var html = _this.template(token.toJSON());
+ var t = token.toJSON();
+ t.lastActivity = moment(t.lastActivity, 'X').format('LLL');
+ var html = _this.template(t);
list.append(html);
});
},It looks like this: |
|
@ChristophWurst @PVince81 What is the best way in Backbone to apply the date format stuff? Should this be a template filter? |
|
So far I'd just preformat the date before passing it to the template as string. |
There was a problem hiding this comment.
if we want this information to be available on the client one day, it needs to be OCS, but I think for now it's okay
fef6e35 to
4fae242
Compare
|
@MorrisJobke @LukasReschke @rullzer review please |
4fae242 to
90c3985
Compare
|
|
|
I'd even say, as soon as the token field gets displayed, autoselect it. If the user clicks away and clicks on it again, reselect again. Goal is to be able to quickly Ctrl+C. |
|
| var SubView = Backbone.View.extend({ | ||
| collection: null, | ||
| type: 0, | ||
| template: Handlebars.compile(TEMPLATE_TOKEN), |
There was a problem hiding this comment.
compile the template at usage time.
90c3985 to
f90d548
Compare
There was a problem hiding this comment.
if someone knows a better way let me know
|
|
f90d548 to
124db68
Compare
|
|
5895033 to
74277c2
Compare
Not a bug in my opinion, but I'll open an enhancement issue. |
|
Fair enough 👍 |
|
Second review ? @nickvergessen @schiesbn @MorrisJobke @LukasReschke @Xenopathic @rullzer |
| $qb = $this->db->getQueryBuilder(); | ||
| $qb->delete('authtoken') | ||
| ->where($qb->expr()->eq('id', $qb->createNamedParameter($id))) | ||
| ->andWhere($qb->expr()->eq('uid', $qb->createNamedParameter($user->getUID()))); |
There was a problem hiding this comment.
not required, because id is unique?
There was a problem hiding this comment.
Or don't you check ownership before
There was a problem hiding this comment.
Exactly, I want to prevent users deleting other users tokens
|
Works, and I agree that the same name is "not a bug" 👍 |
|
Cool feature, thanks guys :) |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |



requires #24686, #24677
fixes #23458
TODO:
Ideas for follow-up PRs:
Mozilla/5.0 (Linux) mirall/2.1.1to something likeownCloud sync client 2.1.1cc @MorrisJobke