use strict;
use warnings;

package Liberl::Model::Format;
use Jifty::DBI::Schema;

use Liberl::Record schema {
    column name =>
        label is _('Name'),
        type is 'text';
};

# Your model-specific methods go here.

sub since { '0.0.5' }

sub current_user_can {
    my $self = shift;
    my $type = shift;
    my %args = (@_);

    return 1 if $self->current_user->id;

    return 0 if (
        $type eq 'update' ||
        $type eq 'create' ||
        $type eq 'delete'
        );

    return 1;
}

1;

