Skip to content

Commit

Permalink
FEAT: enable secure again (although not fully implemented yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldes committed Mar 31, 2020
1 parent 3f9ac42 commit f913b27
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/mezz/base-funcs.r
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ default: func [
unless all [value? word not none? get word] [set word :value] :value
]

secure: func ['d] [boot-print "SECURE is disabled"]
;secure: func ['d] [boot-print "SECURE is disabled"]

1 change: 1 addition & 0 deletions src/mezz/boot-files.r
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ REBOL [

;-- lib: mid-level lib context:
[
%mezz-secure.r
%mezz-types.r
%mezz-func.r
%mezz-debug.r
Expand Down
29 changes: 15 additions & 14 deletions src/mezz/mezz-secure.r
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@ secure: function/with [
pol-obj: get-policies ; a deep copy

if policy = 'help [
print "You can set policies for:"
foreach [target pol] pol-obj [print [" " target]]
print "These can be set to:"
foreach [t d] [
allow "no security"
ask "ask user for permission"
throw "throw as an error"
quit "exit the program immediately"
file "a file path"
url "a file path"
other "other value, such as integer"
] [print [" " t "-" d]]
print "Settings for read, write, and execute are also available."
print "Type: help/doc secure for detailed documentation and examples."
print " You can set policies for:^[[1;32m"
foreach [target pol] pol-obj [print [" " target]]
print " ^[[mThese can be set to:"
print [
"^[[1;32m allow ^[[m - no security^/"
;"^[[1;32m ask "ask user for permission" ;-- yet not implemented!
"^[[1;32m throw ^[[m - throw as an error^/"
"^[[1;32m quit ^[[m - exit the program immediately^/"
"^[[1;32m file ^[[m - a file path^/"
"^[[1;32m url ^[[m - a file path^/"
"^[[1;32m other ^[[m - other value, such as integer"
]
print " Settings for read, write, and execute are also available."
print "^/ ^[[1;35mNOTE: ^[[1;31mSecure is not fully implemented!^/"
;print "Type: help/doc secure for detailed documentation and examples."
exit
]

Expand Down

0 comments on commit f913b27

Please sign in to comment.