-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
re: 'alert-danger' #1
Comments
Thanks much. Yes, ugly code. The thing is, either I need to do a recursive ACL search to find out if user is authorized by the file (in the works but tricky to do) or I need to try to get the file. If you try to get a file you aren't authorized for, you get back an HTML page including the words "alert-danger" so that is what I used to trap the error. Previously, when I was storing the code for solid -ide on the POD, that could cause problems because the words "alert-danger" occur in the javascript, so I excluded that. No longer relevant since everything moved to Github. Thanks for the reminder I need to clean this up, much appreciated. Maybe I should change it to look for /danger Will Robinson/ :-). |
Ah, nice hack! But tricky cos 'alert-danger' is in Warp's app.css and bootstrap.css and many other css files i suspect. Also, in Spoggy4 the file is renamed "solid-tools.js" so self-exclusion could be done dynamically.. var parts = document.currentScript.src.split("/");
var result = parts[parts.length - 1]; // "test.js"
// ... && !thing.url.match(result) |
Proof once again, that clever as it may be, a hack is still a hack. I'll figure out something better and will let @smag0 know for spoggy. BTW, I'm about to release a new solid-file-client - that, with help of @linonetwo, will have tests and ec6 and other improvements. |
Yes, linonetwo's been busy! ping Smag0: @scenaristeur |
@kustomzone & @jeff-zucker thxs for the mention, I'll take a look. What i did for solid-tools of Spoggy4 was a 'pseudo-ugly-clone' of the solid-ide. |
Spoggy looks cool, I hope to have time to actually explore it soon. I think the only major interface change will be that readFile() will return the body of the file, not an object with the body in body.value - a pain but worth it for consistency in the long run. |
spoggy4 was a test with Polymer3 & Solid', but Polymer3 is not stable. |
Hey Jeff, been enjoying your solside app, but just came across a small bug...
In the older version, 'solid-auth-simple.js' throws "Not authorized to access [path-to-file]" alert.
In the current version, 'solid-ide-solidHandler.js' throws "undefined (undefined)" alert.
They do this with any file that contains the text "alert-danger" due to the following code..
I'm not sure why the body text 'alert-danger' is targeted in this code, but also 'solid-auth-simple' is no longer present (ie. self-excluded from the alert).
Cheers.
The text was updated successfully, but these errors were encountered: