REQUIREMENTS
You need to design a programming module PERMISSIONS that would allow Caller to
Grant a permission to a user
Check if a user has a particular permission
Caller is an external system that uses our module (particularly it calls our API).
Permission is a user right to take an action or access a resource. Permissions for resource access can be READ or WRITE. For example, Caller can grant a permission ”reboot the server” (an example of action) OR write to a file “C:/[login to view URL]” (an example of resource) to a user Andrew.
Caller can grant permissions directly to a user OR via roles. If Caller wants to grant permissions via roles then Caller needs to register a role, grant permissions to the role and then assign the role to a user.
Caller can assign many roles to a user.
As a note, our module (you are designing) doesn’t provide any dictionaries to Caller. All objects (including Users) are created / managed by Caller. Our module provides ONLY functionality.
OUTCOME
NOTE: You don’t have to strictly use a specific programming language for the exercise. You can use just a meta syntax that would give us an idea of your solution - we’re not going to compile it for sure :).
We would expect you to write module API (a list of functions with parameters) and design a database for the module. A list of functions can look like this:
function AddEmployee(company, first_name, last_name, age): boolean;
function AddJob(company, first_name, last_name, age): boolean;
function IsEmployeeFired(employeeId): boolean;
...
If you want to pass an object as a parameter you can describe an object separately:
Class Company {
String name;
String address;
Integer taxId;
}
Database design can be presented as a list of tables with most important fields (no need to define indexes, etc). For example,
Table Companies {
Id,
Name,
Address,
TaxId
}
Table Employees {
Id,
CompanyId, // this is a foreign key to Company
FirstName,
LastName,
Job
}
Please apply If you can do this in shor time.
I am looking for only expert in Ruby on Rails.
Hi there, I would like to work for this project.
I am Software Engineer and professional full-stack Rails developer for more than 7 years. I am going to implement this project from ground according to your specific needs and you will be the only owner of the code. Please mind my %100 completion rate and my profile reviews.
Kind regards,
Yigit
Hi,
I am Full stack Ruby on Rails and Ruby developer .
I look forward to speaking with you about this employment opportunity.
Skills:
- Ruby
- Ruby on Rails
Hi!
I can do this for you.
I have done many similar things in the past.
I have more than 12 years constant experience with Ruby and Rails.
While I am sure I can do this, I am not 100% certain of your specifications.
You want a meta-example of how to do this?
I could actually build it in Ruby or Rails just as easily as, or more easily than, trying to write some sort of meta-code for an example.
I would appreciate it if you could let me know more specifically what actions you would like to allow the "caller" to be able to do.
Hi,
I'm a senior developer with 6+ years of experience in technologies like rails, django, angular.js and react.js and used relational databases like postgresql and mysql along with nosql dbs like mongo and redis.
Moreover hands on experience in server setup and code deployment using scripts.
We can discuss more about myself and the project over chat.
Thanks