Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Cranspasswords
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Benjamin Graillot
Cranspasswords
Commits
7bcf8a0a
Commit
7bcf8a0a
authored
12 years ago
by
Daniel STAN
Browse files
Options
Downloads
Patches
Plain Diff
Roles par défaut = ceux en écriture
parent
3c834023
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cranspasswords.py
+9
-2
9 additions, 2 deletions
cranspasswords.py
with
9 additions
and
2 deletions
cranspasswords.py
+
9
−
2
View file @
7bcf8a0a
...
...
@@ -259,14 +259,21 @@ def edit_file(fname):
if
not
confirm
(
"
Créer fichier ?
"
):
return
texte
=
""
value
=
{
'
roles
'
:
get_my_roles
()}
roles
=
get_my_roles
()
# Par défaut les roles d'un fichier sont ceux en écriture de son
# créateur
roles
=
[
r
[:
-
2
]
for
r
in
filter
(
lamba
r
:
r
.
endswith
(
'
-w
'
),
roles
)]
if
roles
==
[]:
print
"
Vous ne possédez aucun rôle en écriture ! Abandon.
"
return
value
=
{
'
roles
'
:
roles
}
else
:
(
sin
,
sout
)
=
gpg
(
'
decrypt
'
)
sin
.
write
(
value
[
'
contents
'
])
sin
.
close
()
texte
=
sout
.
read
()
ntexte
=
editor
(
texte
)
if
ntexte
==
None
and
not
nfile
and
NROLES
!
=
None
:
if
ntexte
==
None
and
not
nfile
and
NROLES
=
=
None
:
print
"
Pas de modifications effectuées
"
else
:
if
put_password
(
fname
,
value
[
'
roles
'
],
ntexte
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment