moved "Rank" attribute from language file to plugin code

added plugin "plugin_manager"
added plugin "user_manager"
This commit is contained in:
lars 2006-10-11 15:50:24 +00:00
parent ee82f91a64
commit 11c2873934
28 changed files with 368 additions and 21 deletions

View file

@ -4,6 +4,7 @@ class format_fs(CryptoBoxPlugin.CryptoBoxPlugin):
pluginCapabilities = [ "volume" ]
requestAuth = True
rank = 60
## map filesystem types to the appropriate arguments for 'mkfs'
fsTypes = {
@ -67,11 +68,11 @@ class format_fs(CryptoBoxPlugin.CryptoBoxPlugin):
def __format_luks(self, fsType, pw, pw2):
if not pw:
self.hdf["Data.Warning"] = "EmptyCryptoPassword"
self.hdf["Data.Warning"] = "EmptyPassword"
self.cbox.log.warn("no crypto password was supplied for initialization of device '%s'" % self.device)
return "volume_format"
if pw != pw2:
self.hdf["Data.Warning"] = "DifferentCryptoPasswords"
self.hdf["Data.Warning"] = "DifferentPasswords"
self.cbox.log.warn("the crypto password was not repeated correctly for initialization of device '%s'" % self.device)
return "volume_format"
container = self.cbox.getContainer(self.device)

View file

@ -1,6 +1,5 @@
Name = Create filesystems
Link = Format
Rank = 60
Title.Format = Initializing filesystem

View file

@ -19,8 +19,8 @@
var:html_escape(Lang.Plugins.format_fs.Text.Yes) ?><?cs else ?><?cs
var:html_escape(Lang.Plugins.format_fs.Text.No) ?><?cs /if ?></p>
<p><label for="crypto_password"><?cs var:html_escape(Lang.Text.EnterNewCryptoPassword) ?></label> <input type="password" id="crypto_password" name="crypto_password" /></p>
<p><label for="crypto_password2"><?cs var:html_escape(Lang.Text.EnterSameCryptoPassword) ?></label> <input type="password" id="crypto_password2" name="crypto_password2" /></p>
<p><label for="crypto_password"><?cs var:html_escape(Lang.Text.EnterNewPassword) ?></label> <input type="password" id="crypto_password" name="crypto_password" /></p>
<p><label for="crypto_password2"><?cs var:html_escape(Lang.Text.EnterSamePassword) ?></label> <input type="password" id="crypto_password2" name="crypto_password2" /></p>
<input type="hidden" name="device" value="<?cs var:Data.CurrentDisk.device ?>" />
<input type="hidden" name="fs_type" value="<?cs var:html_escape(Data.Plugins.format_fs.fs_type) ?>" />
<input type="hidden" name="container_type" value="<?cs var:html_escape(Data.Plugins.format_fs.container_type) ?>" />