This repository was archived by the owner on Dec 5, 2024. It is now read-only.
Commit af45a79
committed
Report the correct editing status to Unity. Fixes #934
There's two issues going on here
- The `loggedInUser` field wasn't getting seeded with user information on load,
so checking whether the current user owns a lock would always fail until the
connections changed event got triggered somehow
- `GetLock` didn't account for not having user information, so if the user was
logged out, it would default to not allowing any edits. Since the info wasn't
getting seeded, it would always report files as being locked by someone else.
It now defaults to allowing edits if the user isn't signed in. Now, this isn't
a bug, but if the user is not signed in, all bets are kinda off on validating
locks. We should probably warn the user that we can't check whether they own
the lock, but we should probably not lock down Unity entirely because of it.1 parent 1bd5a07 commit af45a79
File tree
1 file changed
+18
-9
lines changed- src/UnityExtension/Assets/Editor/GitHub.Unity/UI
1 file changed
+18
-9
lines changedLines changed: 18 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | | - | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
45 | | - | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | | - | |
52 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
53 | 57 | | |
54 | 58 | | |
55 | 59 | | |
| |||
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
69 | | - | |
| 73 | + | |
70 | 74 | | |
71 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
72 | 81 | | |
73 | 82 | | |
74 | 83 | | |
| |||
78 | 87 | | |
79 | 88 | | |
80 | 89 | | |
81 | | - | |
82 | | - | |
83 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
0 commit comments