Assignment 6 Profiles
Assignment 6 Profiles
One by one, let's take a look at the kinds of access that each one of these users needs and, more
importantly, the kinds of access they don't need to do their jobs. Once we've compiled a set of
required permissions, we'll figure out how to implement them in the rest of the chapter.
Although Mario has the most powerful role in our Recruiting app, we still can't give him
complete free reign. While it's OK for job posting and employment website data to be
permanently deleted at any time, state and federal public records laws require that all other
recruitment-related records be saved for a number of years so that if a hiring decision is
questioned, it can be defended in court. Consequently, we need to make sure that Mario will
never accidentally delete a record that needs to be saved to fulfill the law.
But how will he keep the number of positions, candidates, job applications, and reviews in
check if he can't delete them? Won't the app become swamped with old data? Not if we're
smart about it—instead of having Mario delete old records, we can use the Status field on
a record as an indication of whether it's current. We'll filter out all of the old records by using
a simple list view.
Here's a summary of the required permissions that we need to implement for a recruiter:
130
Securing and Sharing Data
131
Chapter 7: Securing and Sharing Data
manager. Also, since Ben has no reason to see a candidate's social security
number, this field should be restricted from his view.
Job Application
As the hiring manager, Ben needs to be able to update the status of those
job applications to specify which candidates should be selected or rejected.
However, he should not be able to change the candidate listed on the job
application, nor the position to which the candidate is applying, so we'll
have to find a way of preventing Ben from updating the lookup fields on
job applications.
Review
To make a decision about the candidates who are applying, Ben needs to
see the reviews posted by the interviewers, as well as make comments on
them if he thinks the interviewer was being too biased in his or her review.
Likewise, Ben needs to be able to create reviews so that he can remember
his own impressions of the candidates he interviews.
Job Posting
Ben wants to make sure his harder-to-fill positions are visible to the most
talented people in the field. The most efficient way to do this is by posting
open positions on various employment websites. Given that employment
websites have different types of users with varying skill sets, we should
give Ben the power to unilaterally create job postings on employment
websites, since Ben is the best person to ascertain which skill sets are
necessary for his open positions.
Employment Website
If Ben had his way, he would usurp all of the company's budget for posting
his open positions on employment websites; therefore, Ben shouldn't be
allowed to modify employment website records, as that would let him
redefine the company's budget for posting jobs and could lead to an
accounting fiasco. Still, we need to make sure that Ben can view
employment website records to get an idea of the employment websites
with which Universal Containers has accounts, and how much of the
budget for that employment website is available.
Here's a summary of the required permissions we need to implement for a hiring manager:
132
Securing and Sharing Data
* Only for those records that are associated with a position to which the hiring manager has
been assigned
Melissa must be able to create and edit her reviews so that she can record her comments about
each candidate, but she shouldn't be able to see the reviews of other interviewers—reading
them might sway her opinion one way or the other. As with hiring managers and recruiters,
Melissa also shouldn't be allowed to delete any records to ensure that public records laws are
fulfilled.
Finally, the posting of jobs to employment websites has no bearing on Melissa's responsibilities,
so both the employment website and job posting records should be completely off-limits to
her.
133
Chapter 7: Securing and Sharing Data
* Only for those records that are associated with a position to which the interviewer has been
assigned
Here's a summary of the required permissions we need to implement for a standard employee:
134
Securing and Sharing Data
Standard • Read - - - - -
Employee (No
min/max
pay)
* Only for those records that are associated with a position to which the hiring
manager/interviewer has been assigned
Tip: When implementing the security and sharing rules for your own organization,
it's often useful to create a required permissions table like this to organize your thoughts
and make sure you don't forget to restrict or grant access to a particular user. You'll
135
Chapter 7: Securing and Sharing Data
see that we're going to refer back to this table again and again as we go through this
chapter.
The combination of all of these sharing and security settings in the platform means that we
can easily specify user permissions for an organization of thousands of users without having to
manually configure the permissions for each individual. Pretty neat! Now let's get started
learning more about each of these methods for controlling data, and actually implementing
the security and sharing rules for our app.
137
Chapter 7: Securing and Sharing Data
Introducing Profiles
A profile is a collection of settings and permissions that determine what a user can do in the
platform, kind of like a group in a Windows network, where all of the members of the group
have the same folder permissions and access to the same software. Profiles control:
• The objects the user can view, create, edit, and delete
• The object fields the user can view and edit (more on that later!)
• The tabs the user can view in the app
• The standard and custom apps the user can access
• The page layouts a user sees
• The record types available to the user
• The hours during which the user can log in to the app
• The IP addresses from which the user can log in to the app
Profiles are typically defined by a user's job function (for example, system administrator or
sales representative), but you can have profiles for anything that makes sense for your
organization. A profile can be assigned to many users, but a user can be assigned to only one
profile at a time.
Standard Profiles
The platform provides the following set of standard profiles in every organization:
• Read Only
• Standard User
• Marketing User
• Contract Manager
• Solution Manager
• System Administrator
138
Securing and Sharing Data
Each of these standard profiles includes a default set of permissions for all of the standard
objects available on the platform. For example, users assigned to the Standard User profile can
never create, edit, or delete a campaign.
When a custom object is created, most profiles (except those with “Modify All Data”) don't
get access to the object. You can find more detailed descriptions of all the standard profiles in
the online help, but the important thing to know is that you can never actually edit the
permissions on a standard profile. Instead, if you have access to the Enterprise, Unlimited, or
Developer Editions of the platform, you can make a copy of a standard profile and then
customize that copy to better fit the needs of your organization. That's what we're going to
end up doing for our Recruiting app (and as a result, Enterprise, Unlimited, and Developer
Editions will be the only editions that the Recruiting app will support).
Recruiters are pretty straightforward—they definitely represent a particular job function, and
they need access to different types of data than other users. They need their own profile.
A hiring manager, however, is not exactly a single type of position. For most organizations, a
hiring manager in the Sales department will almost certainly need access to a different type of
data than a hiring manager in Engineering. However, for the purposes of our app, sales managers
and software managers still need the same types of access to recruiting data—reviews, candidates,
positions, job applications, job postings, and employment websites. Let's keep this as a single
profile for now, but if incorporating our app into an organization with other CRM functionality,
we'll need to suggest as a best practice that the hiring manager permissions for recruiting-related
data need to be replicated for any profile to which hiring managers belong.
Finally, let's look at interviewers and standard employees. Neither one of these user types
reflects a particular job function, and when you think about it, just about anyone in an
organization might be called upon to perform an interview. Let's define a single profile for a
standard employee and find a way to grant interviewers access to the records that they need
through some other mechanism. (Hint: we can use a combination of organization-wide defaults
and sharing rules to make this work.)
139
Chapter 7: Securing and Sharing Data
1. Click
ClickYour ➤ Setup Users
➤ Manage
Name
Setup ➤ Manage Users ➤ Profiles.
➤ Profiles,
Here you should see the list of standard profiles that we talked about earlier. After we create
our custom profiles, they'll also show up in this list.
First, we can quickly tell which profiles we can play with by looking at the Custom column—if
it's checked, that means it's a custom profile and we can edit anything about it. If that column
is not checked, we can still click the Edit link; we just can't modify any of the permission
settings. (What does that leave for us to edit on a standard profile? Well, we can choose which
tabs should appear at the top of a user's page, and we can also select the apps that are available
in the Force.com app menu in the top-right corner of the page.)
2. Create a new profile named Recruiter based on the Standard User profile.
There are actually two ways of doing this—we can either click New, select an existing profile
to clone, name it, and click Save, or we can simply click Clone in the detail page of the profile
that we want to copy, name it, and click Save. Ultimately, it's the same number of clicks, so
choose the method you like best. Standard User is the profile that most closely resembles what
we want our new Recruiter profile to look like, so it's a good starting point.
The Recruiter edit page should look and function exactly like the Standard User profile edit
page except with one important difference: you have the ability to modify any of the permission
settings.
140
Securing and Sharing Data
4. In the Custom App Settings area, make the Recruiting app visible to users assigned
to the Recruiter profile, as shown in the following screenshot.
Tip: You can also give this profile access to any of the other available apps as well.
Every profile needs to have at least one visible app.
When an app is visible, a user can select it from the Force.com app menu at the top-right
corner of the page. Be aware, however, that even if an app is visible, the app's tabs won't show
up unless a profile has permissions to view the tabs and permission to view the associated
object. (We'll set both of those permissions lower down in the Profile edit page.)
Making this selection means that the Recruiting app will be displayed when a user logs in.
You'll notice that when you select an app as the default, its Visible checkbox is automatically
selected, because it doesn't make sense for an app to be the default if it's not visible to the user.
6. In the Tab Settings area, select Default On for the Positions, Job Applications,
Candidates, and Employment Websites tabs.
Tip: You can choose whether you want other tabs to be displayed based on the
additional apps that you made visible in the last step.
For the purposes of our Recruiting app, all of our custom recruiting tabs are on by default. For
any other tabs that you select, you can choose which should be displayed on top of the user's
page (Default On), hidden from the user's page but available when he or she clicks the All
Tabs tab on the far right (Default Off ), or completely hidden from the user (Tab Hidden).
Realize that even if you completely hide a tab, users can still see the records that would have
appeared in that tab in search results and in related lists. (To prevent a user from accessing
data, we have to set the proper restrictions in the Standard and Custom Object Permissions
areas lower down in the Profile edit page—we'll get there shortly!)
The Overwrite users' personal tab customizations setting appears if you have
an organization that's currently in use and you want to make sure your existing users are viewing
the tabs that you've selected. You don't need to select this for our app because we're defining
141
Chapter 7: Securing and Sharing Data
a brand-new profile and no one has personalized his or her tab visibility settings yet. However,
if you do want to select this option at some point in the future, just make sure you're not going
to annoy your users by deleting all of their customizations!
Just below the Tab Settings area, the Administrative and General User Permissions areas of
the profile allow you to grant special access to features and functionality that don't map directly
to particular objects. None of these permissions affects our Recruiting app, but you can learn
more about them in the online help.
7. In the Custom Object Permissions area, specify the object-level permissions for our
Recruiter profile according to the following table.
142
Securing and Sharing Data
Tip: Depending on the apps that you made visible previously, you can also set
additional object permissions on standard or other custom objects.
Since there are no instances when a recruiter should be allowed to delete positions, candidates,
job applications, and reviews, we should make sure that the object-level permissions for deletion
are turned off for these objects. Also, make sure the “View All” and “Modify All” permissions
are only selected for job postings and employment websites. These are special kinds of object
permissions that we'll discuss later in this chapter.
By restricting the power to delete recruiting-related objects here, recruiters will never be able
to delete these objects. However, the fact that we're granting recruiters permission to create,
read, or edit our recruiting objects does not necessarily mean that recruiters will be allowed to
read or edit every recruiting object record. Why?
Here we see the result of two really important concepts in the platform:
For example, our new profile gives a recruiter permission to create, edit, and view reviews.
However, if we set organization-wide defaults for reviews to Private (a record-level permission),
our recruiter will be allowed to edit and view only his own reviews, and not the reviews owned
by other users. We'll learn more about record-level permissions later and go through more
examples of how they work with the object-level ones, but for now, just understand that
object-level permissions are only one piece of the puzzle.
8. Click Save to create your profile and return to the profile detail page.
143
Chapter 7: Securing and Sharing Data
Congratulations! We're done with our first profile. As you can see, it really wasn't that hard,
because we'd already analyzed our required permissions and knew what objects recruiters will
need access to. In the next section, let's quickly finish up our other two profiles and then move
on to field-level security.
To make each profile, go ahead and follow the steps that we outlined in the previous section.
The important things to remember for these profiles are:
• The profiles should be named Hiring Manager and Standard Employee and should be
based on the standard profile that best fits your needs. We used Standard User for our
Recruiter profile, and that's probably a good one for Standard Employee as well. However,
for your organization you might find that Hiring Manager more closely resembles the
Contract or Solution Manager profile instead. It's up to you.
• The Recruiting app for both profiles must be set to Visible.
• For the Hiring Manager profile, set the tabs for Positions, Candidates, Job Applications,
and Employment Websites to Default On.
• For the Standard Employee profile, set the tabs for Positions, Candidates, and Job
Applications to Default On, but set the tab for Employment Website to Tab Hidden.
• Standard and custom object permissions should reflect the required permissions that we
worked on before.
To refresh our memories, let's take a look at our required permissions summary table:
Table 27: Summary of Required Permissions: Hiring Manager, Interviewer, and Standard
Employee
144
Securing and Sharing Data
Standard • Read - - - - -
Employee (No
min/max
pay)
* Only for those records that are associated with a position to which the hiring
manager/interviewer has been assigned
This table is a little confusing right now, because Interviewer and Standard Employee are still
separated into two different users. Let's go ahead and combine them into a single Standard
Employee user so that it's a little easier to see what object-level permissions we need to grant.
It's easy to do, because Interviewers and Standard Employees have the same permissions on
the Position object, and we already have asterisks on Candidates, Job Applications, and Reviews
that ensures these users won't look at anything to which they're not assigned as an interviewer:
145
Chapter 7: Securing and Sharing Data
* Only for those records that are associated with a position to which the hiring manager/standard
employee has been assigned
Great, but what about all of those asterisks and restrictions on visible fields? Do we need to
take those into account when we set our object-level permissions?
Not at all. Those asterisks and field restrictions represent record- and field-level security settings
that we're going to have to specify elsewhere in our app. The only things we need to care about
here are the permissions that these users will need to have access to at least some of the
time—that's the whole point of object-level permissions:
• For hiring managers, that's create, read, and edit on Positions and Reviews, read on
Candidates and Employment Websites, and read and edit on Job Applications
• For standard employees, that's read on Positions, Candidates, and Job Applications, and
create, read, and edit on Reviews
Fantastic! We've just finished defining profiles and object-level permissions for all the users
in our Recruiting app.
146