Class: Salesforce::Types::FieldPermissions

Inherits:
Object
  • Object
show all
Includes:
ROXML
Defined in:
lib/mdata/types/FieldPermissions.rb

Overview

A generic FieldPermissions class that can be extended for specific metadata objects, e.g. PermissionSetFieldPermissions.

Author:

  • Ben Burwell

Direct Known Subclasses

PermissionSetFieldPermissions

Instance Method Summary collapse

Instance Method Details

#to_flag_styleString

A Unix flag style representation of the permissions, suitable for printing in a table

Returns:

  • (String)

    the granted permissions



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/mdata/types/FieldPermissions.rb', line 20

def to_flag_style
	permissions = ''

	if @editable == 'true'
		permissions += 'editable '
	else
		permissions += '         '
	end

	if @readable == 'true'
		permissions += 'readable'
	else
		permissions += '        '
	end

	permissions
end