Closed
Bug 1218039
Opened 10 years ago
Closed 10 years ago
Make it easier to tell what kind of principal you have
Categories
(Core :: Security: CAPS, defect)
Core
Security: CAPS
Tracking
()
RESOLVED
FIXED
mozilla44
| Tracking | Status | |
|---|---|---|
| firefox44 | --- | fixed |
People
(Reporter: bholley, Assigned: bholley)
Details
Attachments
(1 file)
|
11.33 KB,
patch
|
gkrizsanits
:
review+
|
Details | Diff | Splinter Review |
Right now there are various roundabout ways to do this, but we should just expose something obvious on nsIPrincipal. I've got a patch.
| Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8678406 -
Flags: review?(gkrizsanits)
Comment 2•10 years ago
|
||
Comment on attachment 8678406 [details] [diff] [review]
Add a nice interface for both C++ and JS to access the principal kind. v1
Review of attachment 8678406 [details] [diff] [review]:
-----------------------------------------------------------------
This is an awesome idea, thanks! Can we also expose |kind| on the IDL level? It would be so cool sometime to just print the principals type (eh, kind). I know it's annoying to expose enums with IDL, but would be useful imo, what do you think?
Attachment #8678406 -
Flags: review?(gkrizsanits) → review+
| Assignee | ||
Comment 3•10 years ago
|
||
(In reply to Gabor Krizsanits [:krizsa :gabor] from comment #2)
> This is an awesome idea, thanks! Can we also expose |kind| on the IDL level?
> It would be so cool sometime to just print the principals type (eh, kind). I
> know it's annoying to expose enums with IDL, but would be useful imo, what
> do you think?
Do you mean to access from C++ or JS? With C++ you can already get it via BasePrincipal::Cast. For debugging JS, I think it's good enough to print .origin, which has all the information needed.
Comment 5•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
status-firefox44:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
Comment 6•10 years ago
|
||
> Do you mean to access from C++ or JS? With C++ you can already get it via
> BasePrincipal::Cast. For debugging JS, I think it's good enough to print
> .origin, which has all the information needed.
Oh, you're right I forgot that we already have meaningful origin for all principals.
You need to log in
before you can comment on or make changes to this bug.
Description
•