summaryrefslogtreecommitdiffstats
path: root/app/class (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-06-10Fix typoMalf Furious1-1/+1
2016-06-10Add functions to Object class to determine user permissionsMalf Furious1-0/+313
Added a variety of functions to the Object base class for testing a user's access level to another object. Also added functions to test whether a given user or group is an owner or member of another object.
2016-06-08Add function Object::getOwner()Malf Furious1-0/+12
Added object function to get the owner of an object. This base-class function returns a User object, however a user might not always be the kind of owner (eg: a group can own a pad). In these situations, Object sub-classes should override this function and return the appropriate type of object.
2016-06-08Add function Object::getMembers()Malf Furious1-0/+16
Added object function to get an array of all its members. These will always be user objects, so this is always a safe function to call.
2016-06-01Add function Group::createNewGroup()Malf Furious2-0/+17
This function will initialize a new group object and write it to the database, with a given group name and owner user.
2016-05-26Add copyright notice to Scrott class filesMalf Furious15-0/+210
2016-05-22Define Scrott version number constant throughout appMalf Furious1-0/+3
2016-05-22Add function User::getNumAdmins()Malf Furious1-0/+10
Function to count the number of admin accounts that exist. This is used to make sure that while deleteing accounts, the number of administrators never drops to zero.
2016-05-01Add function User::rmHeadImage()Malf Furious1-0/+11
Function to delete the user image file for the given user object.
2016-05-01Fix to Form::saveFile()Malf Furious1-1/+3
Only log an error if we get an upload error besides err code 4 (No file uploaded)
2016-05-01Add function getHeadImage() to User classMalf Furious1-0/+8
This function will return the path to the head image (user image) for the user object. This path should be something like: <APP_ROOT>/file.php?d=img/heads&f=<GUID>
2016-04-27Add function Form::saveFile()Malf Furious1-0/+41
This is a rework of how the framework handles performing file uploads. Rather than attaching new fields to a form (of type file) and handling them during populate() then saving later, users can call what is essentially a static function and save files in isolation. Since each webform I can conceive using in Scrott at this time won't be uploading more than one file at a time, this model should work nicely moving forward; however can be easily adjusted if need be.
2016-04-27Revert "Add form field type 'file'"Malf Furious1-17/+0
This reverts commit 8ad6e8f9223bd3ee214478b3e1247f9c7d8e91ec. See parent commit message
2016-04-27Revert "Update function Form::populate() to initialize fields added with ↵Malf Furious1-35/+1
Form::field_file()" This reverts commit 1f8b53e426b8c0a1546e9d5c21573be9003cb556. See parent commit message.
2016-04-27Revert "Add function Form::saveUploadedFile()"Malf Furious1-8/+0
This reverts commit 3d493fc75dc6e3593001c2d9dfef26f4c1d79c2c. The way I was wanting to handle file uploads isn't going to fly with a semantic of PHP and POST var mgmt. -.- Rolling back relevant changes to write up something else.
2016-03-29Add function Form::saveUploadedFile()Malf Furious1-0/+8
Added function to form class to move tmp uploaded files to permanent storage
2016-03-27Update function Form::populate() to initialize fields added with ↵Malf Furious1-1/+35
Form::field_file() Set $form->[name] for each file field type setup on the form.
2016-03-27Add form field type 'file'Malf Furious1-0/+17
Add the Form::field_file() function to allow form handlers to specify they expect to receive file from the end-user. This adds data about the file field to the form, but does not yet handle it in the populate function
2016-03-27Add function User::getAddUsers_orderByAdminByName()Malf Furious1-0/+16
Added function to retrive all users in system presorted first by admin status (Admins first), then by username in alpha order
2016-03-27Move getUserGlyphicon function from common model into user classMalf Furious1-0/+11
2016-03-27Alter representation of form boolean valuesMalf Furious1-1/+1
Changed how Form() objects model true and false for boolean fields. Was "true" and "false", is now "1" and "0", respectivly. This is to address how Mysql handles these values as they are pushed to the db.
2016-03-27Add function User::confirmEmailKey()Malf Furious1-0/+12
Validates the users supposed email key. If correct, sets the users emailConf flag.
2016-03-27Add function User::setEmail()Malf Furious1-2/+11
This function handles internal vars while updating a user's email address.
2016-03-27Add function User::setPassword()Malf Furious1-2/+10
This user function will update the salt and key for a user object to change its password.
2016-03-27Add function getDisplayName() to User classMalf Furious1-0/+11
If a user has an alias set, it should be displayed throughout the app instead of the username.
2016-03-26Fix bug in Framework::getCurrentUser() functionMalf Furious1-1/+8
If, by some means, the GUID for a logged in user is not valid, that session should be terminated ("$this->setCurrentUser();") This might happen if the database gets flushed, or if an account gets removed while it is in use...
2016-03-05Add verify_ip security assertionMalf Furious1-0/+15
This assertion will be used app-wide. This asserts that the IP address a client uses to conenct to the app is constant throughout the the session's lifetime. This is to detect any session hijacking. If a session suddenly appears to be comming from a different IP address, the session will be killed.
2016-03-01Add garbage collection logic to Object::delObj()Malf Furious1-0/+8
Now, on deletion of objects, all refs to it are purged from the xref tables, obj_member and msg_read
2016-02-07Add in-app administrative setting: settSSLMalf Furious1-0/+18
This is the in-app version of $_SCROTT['settSSL'] system-level setting. Setting::settSSL() overrides $_SCROTT['settSSL'] only if the latter is set to 'neither'. If both are set to 'neither', the app will run on either HTTP or HTTPS depending on how the page was requested.
2016-02-07Add fields to Issue objectMalf Furious1-1/+3
This adds attributes to an issue: due date (optional datetime) tags (space separated string of words to help categorize issues (again, optional))
2016-02-02Add admin setting 'allowPublicSignup'Malf Furious1-0/+13
This setting will be used to decide if the app should allow unauthenticated users to create their own user accounts or if an admin must create them.
2016-02-02Add helper function to Setting classMalf Furious1-0/+17
Added a static helper function to replacing (or inserting) an option value in the database, longhand.
2016-02-01Implement authentication helper functions in User classMalf Furious1-0/+24
Added function to initialize a User object by username wrather than GUID. Added function to validate a user-supplied plain-text password for a given user
2016-01-31Implement PHP session semantics in Framework classMalf Furious1-0/+41
Added PHP session handling to core framework. Functions now exist to set the current user, get the current user, and get the IP address used to login (to compare with furure requests on the same session to combat session hijacking).
2016-01-30Add functionality to create new User objectsMalf Furious1-0/+54
User class now has a new function which will take a $username and a $password and use it to initialize itself as well as write new object data to the database. This commit introduces a helper function getKey() (from class User) for creating user object keys by hashing the contatenation of its password and salt. This commit introduces a helper function usernameInUse() (from class User) for ensuring the uniqueness of names amongst user-type objects
2016-01-30Update app source of entropy for creating random blobsMalf Furious1-2/+9
Removed use of PHP's rand() functon in favor of openssl extension's openssl_random_pseudo_bytes() to create blobs with better entropy. Created function getBlob (from class Object) to get a sha256 hash created from randomness for use as object GUIDs, password salts, application tokens, etc.
2016-01-30Handle object timestamps automatically in Object::saveObj()Malf Furious1-0/+14
The saveObj() function now initializes and update the timeCreated and timeUpdated fields of objects on its own. A new function, getCurrentTimestamp() (from class Object) is introduced to aid simpler fetching of the date and time
2016-01-28Add admin field to user tableMalf Furious1-0/+1
User accounts now have a field to denote whether they are site administrators. The first account created during app initial configuration is an admin automatically.
2016-01-26+ Added function to User class to fetch all users from DBMalf Furious1-0/+16
* Altered Auth MVC deflt action to return false if no users are found. This way, the Auth controller can automatically present user a page to create an admin account
2016-01-01+ Added class file for setting tableMalf Furious2-1/+29
2016-01-01+ Added class file for message tableMalf Furious1-0/+26
2016-01-01+ Added class file for issue tableMalf Furious1-0/+28
2015-12-31+ Added class file for stage tableMalf Furious1-0/+25
2015-12-31+ Added class file for Pad tableMalf Furious1-0/+26
2015-12-30+ Added class file for group tableMalf Furious1-0/+20
2015-12-30+ Created class file for extern-user tableMalf Furious1-0/+26
2015-12-30+ Created db table child class for User tableMalf Furious1-0/+30
2015-12-18+ Added DBObject class -- A non-abstract version of Object classMalf Furious1-0/+15
2015-12-18* now using rand() instead of random_bytes for numbersMalf Furious1-1/+1
2015-12-18+ Implemented Object::getNewGUID function for Object classMalf Furious1-0/+15